By just about the narrowest of margins, Harvick was able to eke out the pole over Hamlin.

NASCAR @NASCAR

👏 @KevinHarvick will start from the #BuschPole as he continues his quest #4TheCup https://t.co/180sMZyDj9

NASCAR @NASCAR

That’ll do 😏 #BuschPole https://t.co/GBDoaY0xzJ

It marks Harvick's 24th career pole, third of the season and his second at Richmond. His last pole on the track came back in 2005 for the Chevy Rock & Roll 400. Also of note, he captured victory at the Wonderful Pistachios 400 at Richmond Raceway in 2011.

Afterward, he called winning the pole a "surprise bonus," per NASCAR on NBC:

NASCAR on NBC @NASCARonNBC

The happiness is back for @KevinHarvick after that pole qualifying run.
He'll lead the field to green Saturday night, and try to punch his ticket into the next round of the #NASCARPlayoffs at @RichmondRaceway. https://t.co/HYsdCZKf49

Starting in first will put Harvick in solid positioning to bounce back from a 39th-place finish in Las Vegas last weekend. Prior to that, though, the No. 4 car had recorded eight consecutive top-10 results, including a pair of victories.

Harvick, who has seven victories on the season, currently sits fourth in thepoints standings.

Meanwhile, NASCAR's points leader will start Saturday's race in third, finishing just 0.064 seconds back of Harvick. Truex started in fifth at this race a year ago but had to settle for 20th.

Kyle Busch enters the weekend just two points behind Truex in the standings, but he will start closer to the middle of the pack. Althoughthe No. 18 car made it to the final qualifying stage, he will begin the race in 12th.

Last year's winner Kyle Larson will have some work to do in order to defend his title as he starts in 10th. That comes after he qualified fourth last year. The No. 42 car is currently eighth in the points standings.

As NBC Sports' Daniel McFadinnoted, an impressive 10 of the top 12 spots are occupied by playoff drivers.