Massa, a veteran of 267 grand prix starts, quit F1 at the end of last year but was enticed back by Williams to replace Mercedes-bound Valtteri Bottas.

The Brazilian has scored 36 points this season, four fewer than teammate Lance Stroll, and had said he was keen to stay on for a 16th season but only with Williams.

But Williams has been in no rush to announce who will partner Stroll next year, with Robert Kubica, its reserve Paul di Resta, Pascal Wehrlein and Massa in contention.

Massa said he was keen to know the team’s decision before his home race in Brazil, which takes place next weekend, and became increasingly outspoken.

He questioned the credibility of both Kubica and di Resta as potential candidates for a seat at Williams next year and usefulness of testing them both in a 2014-spec car.

It is believed he dropped down the pecking order of candidates, with Kubica and di Resta now the frontrunners to get the seat next year.

Massa made the decision to announce the news himself via social media.

During 15 years in F1, Massa has scored 11 wins, 41 podiums, 16 pole positions and finished runner-up to Lewis Hamilton in the 2008 drivers’ championship.

In a team statement, Massa said: “As everyone knows, after announcing my retirement from Formula 1 last year, I agreed to return this season to help Williams when the call came.

"I have now enjoyed four great years with the team, but my career in Formula 1 will finally come to an end this season.

"I take so many great memories with me as I prepare for my final two races in Brazil and Abu Dhabi, and although they will be emotional, I am looking forward to ending on a high note and preparing for a new chapter in my career.”

Deputy team principal Claire Williams added: “I would like to thank Felipe for all he has done for the team over the last four years.

"We are especially grateful that he agreed to postpone his retirement from Formula 1 for a year, after Valtteri joined Mercedes, which demonstrated the depth of the relationship we built during our time together.

"We appreciate that it wasn’t an easy decision for him to return, after having such an emotional send-off at the end of last year.

"On behalf of Sir Frank, and all the team, we give our very best wishes to Felipe for the future.”