Piastri will line up alongside Charles Leclerc on the front row for Sunday’s race after an aggressive qualifying run.
The McLaren driver described it as one of the messiest laps of his career as he brushed the walls en route to posting the second fastest time of the session.
“It certainly wasn’t the cleanest,” he admitted.
“A few big moments in there and a couple of love laps with the wall.
“I pushed to get everything out of it that I could, and maybe a little bit too much in some places.”
His eventual margin to Leclerc on pole was just over three-tenths, the Ferrari driver a specialist around the Baku streets.
Piastri admitted that the Ferrari driver’s time, even with a cleaner lap, was likely still out of reach.
“I don’t think I had enough to get pole today,” he confessed.
“I’m pretty happy with the front row and hopefully we can try and put up a fight tomorrow.”
Piastri is the lead McLaren on the grid after Lando Norris was bundled out in Qualifying 1 after mistakenly slowing on his final flying lap that left him 17th.
Behind Piastri in third is Carlos Sainz in the other Ferrari, with Sergio Perez fourth and George Russell fifth – the four leading teams represented in the top five places.
More on Oscar Piastri and McLaren
👉 Oscar Piastri: I won’t pull over for Lando every time
👉 Webber: Monza pass a ‘feather in his cap’ for Piastri
👉 Oscar Piastri targeting 2024 championship glory
“It’s very, very even,” the Australian observed.
“Through all of practice it looked very tight between us, Ferrari, Mercedes, and Red Bull.
“To be honest, I was a bit surprised Red Bull weren’t a bit further up at the end of Q3.”
Piastri had been happy with his car following Friday practice whereas team-mate Norris cut a less enthusiastic figure.
Neither McLaren driver showed especially strongly during the two hours of running on the opening day, but both were fixtures towards the top of the timesheets.
That was underpinned by promising long run race, especially from Piastri.
“I definitely didn’t feel like we were the quickest yesterday but, again, I feel like it’s so close between the to four teams that you never quite know who’s going to come out on top,” the Melburnian noted.
“Red Bull were looking very quick at certain points; Ferrari obviously looking very quick; even Mercedes at points as well.
“I always thought we were in a pretty good place, so no that surprised to be [second].
“Our race pace looked good yesterday but nowadays the top four teams are so close in race pace that qualifying often makes a massive difference,” Piastri added.
“I’ve got confidence that our car will be quick, but I think there’s definitely seven other cars out on the track that are certainly not any slower.”
The Azerbaijan Grand Prix begins at 21:00 AEST.