With new engine regulations coming into force from 2014, with 1.6-litre V6 turbo-charged power units replacing the current 2.4-litre V8s, Williams have taken the opportunity to oust Renault and bring in Mercedes.
Williams only joined forces at the start of last season with Renault, the French manufacturer helping to power Pastor Maldonado to victory in the Spanish Grand Prix, so ending a seven-and-a-half-year drought for Williams.
There had been hopes of a return to the glory years of the 1990s when Williams won five constructors' titles in six years from 1992-1997, along with four drivers' championships, with Nigel Mansell, Alain Prost, Damon Hill and Jacques Villeneuve at the wheel.
But since that relationship ended in 1997, Williams have struggled to find a consistent, reliable partner, with Mercedes to become their seventh different supplier in what will be 18 seasons.
In signing a long-term agreement with Mercedes, Williams founder and team principal Sir Frank Williams said: "Mercedes-Benz has been one of the sport's most successful engine suppliers and we believe they will have an extremely competitive engine package."
Daughter and deputy team principal Claire added: "Securing the right engine supply partnership is a key milestone in the implementation of our strategy for long-term success."
News of the potential tie-up surfaced during the course of the Monaco Grand Prix weekend, with Mercedes motorsport boss Toto Wolff refusing to deny the speculation.
Now confirming the deal, Wolff said: "The proud heritage of Williams and the company's commitment to technological excellence make it a perfect long-term partner for Mercedes-Benz under the new powertrain regulations.
"It is a win-win situation for both HPP (Mercedes-Benz High Performance Powertrains) and Williams, which will ensure HPP is able to supply at least three teams on a long-term basis under the new regulations and could open interesting new perspectives for technology transfer.
"We look forward to enjoying much success together over the coming years."
In joining forces with Williams, for Mercedes it negates the loss of McLaren who recently announced they would be returning to Honda power from 2015.
Renault, meanwhile, will finalise its partners from the 2014 season in the coming weeks, with Caterham and Lotus expected to renew existing deals and world champions Red Bull already on a long-term contract.
Red Bull's sister outfit Toro Rosso are effectively Williams' replacements next season, with the Italian team confirmed as a Renault customer from 2014 over the Monaco Grand Prix weekend.
Jean-Michel Jalinier, president of Renault Sport F1, said: "Williams and Renault have a long history together and quickly recaptured its winning spirit in the early days of the rekindled partnership with victory in Spain 2012.
"We will continue to actively work with the team until the Brazilian GP in November to end the second incarnation of the partnership with results that do justice to its reputation.
"For Renault Sport F1, we have stated on numerous occasions we would supply up to five teams if there was a requirement to do so, but this would not make sense economically or be ideal for our resources.
"Three, or up to four teams, is the ideal for us, so the departure of Williams normalises the situation and makes things much clearer from our side.
"We will announce the next team within a matter of days, and then confirm the final stage before the end of June."