Williams will use Mercedes engines in Formula 1 at least until 2025.
The team, already committed to Mercedes for next season, have signed a new agreement for the following five years.
Williams have declined in form since finishing third in 2014 and 2015, their first two seasons with Mercedes after turbo-hybrid engines came into F1.
They finished last in 2018 and are on course for the same position this year, but they hope a technical department restructure will revive fortunes.
Williams deputy team principal Claire Williams said: “Mercedes has been one of the sport’s most successful engine suppliers and we believe they will continue to have an extremely competitive engine package going forwards.
“Over our time with them they have become a real friend of the team.”
New rules planned for 2021 are aimed at making the grid more competitive. A budget cap has already been agreed, while new technical rules to allow closer racing are being finalised before teams and the sport’s bosses move on to agreeing a more equitable revenue split.
“Williams is one of the iconic brands in F1,” said Mercedes motorsport boss Toto Wolff.
“They have been through some tough times recently but that has only served to demonstrate their resilience and strength of character as they battle back to where they belong on the grid.
“I am certain that the outlook for independent teams is bright under the financial regulations that will be introduced from 2021 and we are delighted to continue our partnership with Williams into that new era of our sport.”
The poor on-track performance from a team that dominated large swathes of the 1980s and 1990s has hit the team financially. This week, they posted a loss of £16.8m for the first six months of this year, which was attributed to reduced prize money and the loss of some sponsorship income.
Chief executive Mike O’Driscoll said: “Although we continue to face challenges in a very dynamic environment, we believe the majority of the impact on EBITDA [earnings before interest, taxes, depreciation, and amortisation] for the full year has already been captured in these interim results.
“We continue to believe we are well placed to respond to the challenges ahead, with world-class facilities and a strong and talented organisation.”
On the driver front, Williams have a contract with British rookie George Russell to continue into next season.
They have not yet decided on a second driver, with incumbent Robert Kubica and reserve driver Nicolas Latifi both in with a chance of the seat.