Daniel Ricciardo thought he was going to crash out of qualifying in Baku before nailing down a P4 spot for Sunday's grid.
The Aussie out-qualified his team-mate Max Verstappen by 0.083s to ensure he will be starting from the second row, but he is counting his lucky stars after a heart-stopping moment at Turn 15.
“Q3 on the first run we brushed the wall and lost some time,” Ricciardo explained.
“The last lap I had to make it clean and fortunately clean was fast enough for the second row. But luckily it was just a kiss.
“When I turned in I thought it was going to be more than a kiss. It was at Turn 15, where I crashed two years ago.
"The car turned enough but I still hit it. I knew I went in very fast, like too fast but it’s fine.”
Ricciardo declared himself happy with his starting position and within the current qualifying gap to Ferrari, which stands at four tenths, as he feels there will be improvement at the tracks to come.
He added: “Second row is pretty good for us on Saturday. In the end it’s not bad. It was not the easiest session, Q2 was very close with the supersofts. We had a couple of yellow flags and it was difficult, but we just made it through.
“I think Seb was about four tenths or something in front, so I think we can live with that for now.
"I think we’ll be closer again when we get to Barcelona and Monaco, but it’s not too bad around this circuit and it gives a good chance to be right there tomorrow.”