Jarno Trulli will drive for Toyota in the final two races of the season. He was sacked by Renault after agreeing to join Toyota in 2005 and has been testing for his new team since then.
The Italian will make his racing debut in place of Ricardo Zonta at the Japanese Grand Prix before stepping in for Olivier Panis in Brazil.
He said: "I'm thankful to Olivier and Ricardo for making this possible. The experience will give me a head start in the way I have to work in the winter."
Panis, who has announced he will retire at the end of the season, will now bow out in Japan but has agreed to stay on Toyota's test and reserve driver.
The Frenchman said: "I understand how important it is for the team to start working with Jarno as soon as possible.
"Toyota asked me to help this process and to leave Ricardo the possibility to race at his home Grand Prix in Brazil. "In consideration of the positive work achieved with Toyota over the last two years, I am willing to give my team-mate Ricardo this opportunity.
"This means that the Japanese Grand Prix will be my last Formula One race, but I look forward to the work which lies ahead of us in the next two years."