Felipe Massa has been forced to withdraw from the Hungarian Grand Prix because of illness and will be replaced by Scot Paul di Resta.
The Brazilian was passed fit to take part in final practice despite going to hospital after feeling dizzy and unwell in Friday's second practice session.
He was released from hospital and spent the night at his hotel, but suffered more problems in final practice.
Di Resta, 31, has not driven the 2017 car and not raced in F1 since 2013.
A statement from Williams said: "The team supports Felipe's decision and the team will work with him to ensure he makes a full recovery, with a view to a return to the race track for the Belgian Grand Prix."
The team did not give any further details on Massa's illness.
In final practice, Ferrari's Sebastian Vettel was comfortably fastest as Mercedes driver and title rival Lewis Hamilton struggled.
Vettel was 0.475 seconds quicker than team-mate Kimi Raikkonen and 0.897secs clear of the Mercedes of Valtteri Bottas, with Hamilton down in fourth.
Hamilton has won in Hungary five times in 10 years but the car lacked balance and grip on Friday and the drivers appeared to be struggling with the same problems on Saturday.
Hamilton was locking wheels and running wide and his fastest lap was a massive 1.417 seconds slower than Vettel, who leads the Briton by one point.
The margin from Vettel back to Bottas of nearly a second is a lifetime in F1 and augurs badly for Mercedes' hopes this weekend.
And as so often when Mercedes struggle in this way, Bottas was making better of it than Hamilton - just as he did in Russia and Monaco earlier this season.
All are low-grip tracks with slow corners. Hamilton tends to overcommit the front end, causing problems with the tyres, while Bottas drives within the limit of grip.
In fact, the race appears to be falling into Ferrari's lap, after Daniel Ricciardo's Red Bull, which was fastest in both sessions on Friday, stopped out on track early on with an engine hydraulics system failure.
Ricciardo ended up eighth quickest, his team-mate Max Verstappen who was not on his pace on Friday fourth and 1.177secs off Vettel's pace.
McLaren are showing encouraging form - Stoffel Vandoorne was an excellent sixth and Fernando Alonso ninth.
On this track that exposes their Honda engine's lack of power less than many others, they appear to be competing for the honour of best of the rest outside the top three with Renault, for whom Nico Hulkenberg was seventh fastest. Hulkenberg has been hit with a five-place grid penalty for an unauthorised gearbox change.
The German's team-mate Jolyon Palmer, who had a torrid day on Friday crashing twice, was 10th, less than 0.3secs behind.