Sergio Perez will race for Force India alongside Esteban Ocon in the 2018 Formula 1 season, the team has announced.
Perez, who was on the radar of two rival F1 teams, had hoped to have clarified his future shortly after the summer break but talks between his sponsors and Force India had delayed a deal being agreed.
Force India has now reached an arrangement with all parties, leading to Perez staying on with the outfit for a fifth season.
"Staying with Sahara Force India was always my priority," said Perez. "It's a team that has allowed me to show my talents as a driver and I feel very happy here.
"I'm proud of everything we have already achieved together and I think there is more to come. The team has done an amazing job this year to develop the car and establish our position as the fourth best team in Formula 1.
"In the end it was an easy decision to continue our journey together."
The deal is believed to be for one year, giving Perez options for next season when seats at Mercedes, Ferrari and Red Bull are potentially available.
Team boss Vijay Mallya added: "Sergio has played an important role in our success story over the last few years.
"Since joining us in 2014, he has matured to become one of the quickest and most consistent drivers on the grid. His track record speaks for itself as the most successful Force India driver ever with four podiums.
"Alongside Esteban, retaining Sergio gives us stability going into next season and one of the most exciting driver pairings in Formula 1."
The announcement means just McLaren, Williams, Toro Rosso and Sauber have yet to confirm their line-ups for next season.
Grosjean unsure wet Singapore GP is viable
Viewpoint: Sebastian Vettel and the F1 team mates he may never have