Felipe Massa has accepted an offer to remain in Formula 1 next year with Williams, paving the way for Valtteri Bottas to replace world champion Nico Rosberg at Mercedes.
Although final contracts have not yet been completed, Autosport's sister title Motorsport.com has learned that if Bottas does move to Mercedes, Massa is prepared to go back on his decision to retire at the end of the 2016 season.
Mercedes is keen to sign Bottas in the wake of Rosberg's shock retirement, but Williams had resisted initial approaches for the Finn, which have included offers of reduced engine supply costs and Mercedes junior driver Pascal Wehrlein as a replacement driver.
Williams said it would need a suitable, experienced replacement if it was to release Bottas, and Massa has now agreed to stay with the team for at least another year to help it deal with the major regulation changes for 2017.
Williams has signed 18-year-old rookie Lance Stroll as one of its drivers for the 2017 season, and departing technical chief Pat Symonds had said earlier this month that it was "crucial" to retain Bottas given Stroll's inexperience.
Mercedes has made it clear that a decision on who will partner Lewis Hamilton will not be announced before next year, with Niki Lauda saying that discussions were proving "difficult".
The world champion team admitted it had been caught off guard by Rosberg's decision and that it wanted to sort its line-up as quickly as possible.