Fernando Alonso was praised by his Ferrari team after he drove his damaged car into fourth on the grid at the Malaysian Grand Prix.
The Spaniard's front suspension was damaged in a collision with Toro Rosso's Daniil Kvyat.
Ferrari repaired it and although Alonso said the car felt "very strange", he qualified two places and 1.043 seconds ahead of team-mate Kimi Raikkonen.
"Not many drivers could have done the lap he did," said Ferrari's Pat Fry.
The team's engineering boss added: "Fernando still had to fight to control the car. He really deserves our congratulations."
Alonso collided with Kvyat early in second qualifying, when the Russian novice dived for a gap that he thought the Ferrari driver had left. Alonso had not seen the Toro Rosso and turned in.
The stewards investigated the incident but took no further action, deciding it was a misunderstanding in the wet conditions, in which visibility was poor.
The session was briefly stopped to clear the track of damage and the Ferrari mechanics changed a broken track rod in Alonso's right front suspension in less than five minutes.
Alonso said: "I'm super happy with this qualifying - probably the biggest smile of my career with fourth position.
"The mechanics did a super job. I think it's a world record of changing a suspension in three minutes, and I was able to keep running.
"The car really felt very strange. I think the toe or something was a little bit crazy after the crash, because it was so light on the right-hand corners and so heavy on the left-hand corners that I could barely move it with two hands.
"It was difficult, but enough to complete the laps, and I think starting fourth should give us a little bit of a possibility or a window to think of the podium for tomorrow."
Fry also praised Raikkonen's performance after the Finn ended up sixth.
"Kimi's performance was no less impressive. We know he's not yet completely happy with the feeling of his car and in the wet the car had some balance problems," he said.