BMW has 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.

Dr Klaus Draeger, Member of the Board of Management of BMW AG with responsibility for development, said today: "We are very happy with this solution. This fulfils the most important requirement for a successful future for the team.

"Our relationship with Peter Sauber has always been excellent and marked by absolute respect.

"We would like to express our thanks to Peter Sauber and the whole team for the excellent co-operation during the recent four years."

Peter Sauber added: "I am very relieved that we have found this solution. It means we can keep the Hinwil location and the majority of workplaces.

"I am convinced that 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."

Doubts had recently been raised about the validity of a prior deal with Qadbak Investments Ltd, which has now been shelved in favour of the sale to Sauber.