Manuel Pellegrini is to take over as manager of Real Betis next season, the Spanish club have announced.
The former Manchester City, West Ham and Real Madrid boss will succeed Rubi, who was sacked by the La Liga outfit last week, as full-time coach.
The 66-year-old Chilean, who has been out of the game since leaving West Ham last December, has agreed a three-year deal at the Benito Villamarin Stadium.
A statement on the club's website read: "Real Betis have signed the Chilean manager Manuel Pellegrini to lead the team from next season.
"Real Betis have appointed a coach of a high level and big international prestige to elevate the performance of the first team in a three-year project."
Pellegrini won the Premier League title with City in 2014 during a three-year spell at the Etihad Stadium that also included two League Cup triumphs.
He had previously led Real Madrid to second in La Liga and both Villarreal and Malaga to the latter stages of the Champions League.
After a stint with Hebei China Fortune he returned to England with West Ham in 2018 but was sacked earlier this season after 18 months in charge.
Betis are currently 13th in La Liga. Alexis Trujillo, who oversaw a 3-0 win over Osasuna on Wednesday, will remain in charge for the final three matches of this season.