(CNN) -- BMW have agreed a deal with Peter Sauber over the sale of the team that should guarantee its involvement in Formula One next season.
An agreement was reached on Thursday, with the contract subject to the condition the team has a starting place on the grid for 2010.
Doubts had recently been raised about the validity of a prior deal with Qadbak Investments Ltd, which has now been shelved in favor of the sale to Sauber.
Toyota's recent withdrawal from F1 had opened the door for the team to take up the 13th slot on the grid for 2010. However, motor sport's world governing body, the FIA, had been reluctant to grant an entry given the uncertain nature of the Qadbak deal.
That arose after BMW announced at the end of July they were pulling out of F1 after four years in the sport.
Sauber, who sold his team to BMW in 2005, failed with a takeover bid in early August and at the time was critical of the German manufacturing giant.
The 65-year-old Swiss claimed negotiations broke down due to BMW's demands being "far too high".
But now he has resumed control, as he enjoyed for 13 years prior to selling up four years ago, the FIA are in a position to formally accept Sauber into the fold.
A delighted Sauber said told reporters: "I am very relieved that we have found this solution. It means we can keep the Hinwil (Switzerland) location and the majority of the workplaces.
"I am convinced the new team has a very good future in Formula One, whose current transformation with new framework conditions will benefit the private teams.
"Our staff here are highly competent and motivated, and I look forward to taking on this new challenge together with them. I would like to thank BMW for four shared years that have, in the main, been very successful."
The only downside for Sauber is that as part of the agreement he is required to cut the current workforce from 388 employees to around 250, with notices of redundancy having been issued.
Due to the restructuring, the possibility of further redundancies in the near future has not been excluded.