Sergio Perez has been signed by Red Bull to partner Max Verstappen in the 2021 Formula One season, with Alex Albon dropped.
Albon will remain with the team as test and reserve driver, as well as playing a key role in their preparations for the 2022 regulation changes.
The move to sign Perez followed months of speculation over what Red Bull would do with one of the final seats available on the grid.
Had Perez, 30, not been given the role, he faced missing out on next season after Racing Point signed four-time world champion Sebastian Vettel to replace him.
"I am incredibly grateful to Red Bull for giving me the opportunity to race for Red Bull Racing in 2021," said the Mexican after his signing was confirmed on Friday.
"The chance to race for a championship-contending team is something I have been hoping for since I joined Formula One and it will be a proud moment to step onto the grid in Red Bull colours alongside Max.
"You can be sure that I will give next season my full focus. The team has the same winning mentality as me and I know I am here to perform and help the team fight for another title."
Team boss Christian Horner revealed the decision had only come after some intense analysis of the data.
"Alex is a valued member of the team and we thought long and hard about this decision," he said.
"Having taken our time to evaluate all the relevant data and performances, we have decided that Sergio is the right driver to partner Max for 2021.
"We look forward to welcoming him to Red Bull Racing."
Perez's long wait to find a seat has been a confusing one to many, given he enjoyed a spectacular year in 2020.
He finished fourth in the drivers' championship, despite missing two races in the middle of the season after testing positive for coronavirus, as well as being forced to retire in Abu Dhabi at the end of the campaign.
Perez, who spent eight of his 11 F1 seasons with Racing Point, finished second in the Turkish Grand Prix and earned an emotional first career win in the penultimate race of 2020 at the Sakhir Grand Prix.
Despite flashing his potential in moments, Albon finished seventh in the championship with only two third-place finishes to show as his best results.
The sensational Verstappen, by contrast, racked up 11 podiums and two race wins, finishing 109 points ahead of his team-mate. He also won the qualifying battle against Albon 17-0.
Red Bull will hope Perez can bridge that gap to ensure Red Bull are better equipped to take the fight to constructors' champions Mercedes.
Mercedes often had a strategic advantage this year when Lewis Hamilton and Valtteri Bottas were battling with an outnumbered Verstappen at the front.
Albon joined Red Bull midway through the 2019 season from junior team AlphaTauri.
His struggles were emphasised when the man he replaced at Red Bull, Pierre Gasly, recorded a stunning victory for AlphaTauri at Monza in September.