From January 2007, the team will be renamed Vodafone McLaren Mercedes and Vodafone will be McLaren's official mobile partner.
The deal includes branding on the new 2007 cars, drivers' and pit crews' overalls and helmets as well as other marketing opportunities such as hospitality, merchandising and promotional rights.
Neither company would disclose financial terms of the deal although it is believed to be worth around £22m a year, the same as the Ferrari contract.
Peter Bamford, Vodafone's chief marketing officer, said: "As title sponsor of the Vodafone McLaren Mercedes team it raises our association with Formula 1 to the ultimate level."
He added: "The new agreement delivers a fantastic marketing platform; the associative rights we acquire as a result of this new sponsorship provide us with additional opportunities to continue to raise brand awareness, build brand preference and drive revenue."
The sponsorship is only the third time in 30 years the McLaren team's title sponsor slot has been made available, previous holders being West and Marlboro.
Ron Dennis, chairman and CEO of the McLaren Group and McLaren Mercedes team principal, said: "As our agreement is long term, this provides important stability within the team, allowing us to focus fully on our objective of winning races and championships together."
Last month, Vodafone terminated a £9m a year shirt sponsorship deal with Manchester United at the end of the 2005/2006 season, two years early. The company will instead become an official partner and the official mobile network of the Champions League.
Separately, chip technology giant Intel is to sponsor the new BMW-Sauber F1 team when it makes its debut from 2006.
Under the deal, the two companies will benefit from shared marketing activities and a technological partnership, which will see Intel develop BMW's worldwide IT infrastructure.
If you have an opinion on this or any other issue raised on Brand Republic, join the debate in the .