Richmond, Va. — Cole Custer was openly hoping for rain to shorten the NASCAR Xfinity race at Richmond Raceway on Friday night.

Then, he was desperately hoping for the rain to stay away.

Custer passed Austin Cindric with 20 laps to go and earned his second victory of the season.

“At that last restart, I tried something a little bit different and it didn’t work out. I knew I had like 25 laps, but then it started raining a little bit and I was like, ‘Man, we might not even make it to the end so I have to get by quick here,’” Custer said.

Cindric had grabbed the lead on a restart with 25 laps to go, but Custer regained the lead five laps later and pulled away for his second victory of the season. The victory also earned Custer a $100,000 bonus as the top finisher among four drivers who qualified. The top four finishers in this race will be eligible for the bonus when the series races next at Talladega Superspeedway in two weeks.

Justin Allgaier dominated the first half of the race and finished third, followed by Tyler Reddick and Ryan Sieg.

Allgaier had the lead until Custer passed him on the inside after he pitted for tires under a green flag and Allgaier opted to stay out. It was a calculated risk for Allgaier, who won the first stage and was hoping that rain in the forecast and on the radar might arrive in time to shorten the race with him in the lead. By NASCAR rules, if the first two stages of a race are complete, the race is official.

But while some rain came, it was not enough to cause the race to be stopped.

“It was so frustrating. They kept telling me it was 20 laps away,” Custer said of the rain. “It never came. … This one means a lot. We haven’t had a short track win yet. We’ve struggled a lot at short tracks. This helps. This definitely means a lot.”

Cindric said he had some raindrops on his windshield after he took the lead and “I turned into the most religious person you’ll ever know praying for it to downpour.”

Allgaier started seventh but worked his way to the front to win the 75-lap first stage, his third stage victory in the last two races. Custer won the second stage when he pulled away on a restart with four laps to go in the stage.

Custer led 122 laps and Allgaier led 86.

“The pit call that we made at the end of the (second) stage, it worked out obviously in our favor, but I pushed really hard to try to get back up to the front and just didn’t have quite enough there are the end to do anything,” Allgaier said.

The race was especially hard on Christopher Bell, who was running near the front in search of his second consecutive victory when he spun, bringing out a caution 10 laps before the end of the second stage. Stopping for repairs put Bell back to 16th position, but when the race went green with 90 laps to go, he very quickly worked his way into contention, running third behind Custer and Allgaier.

But when David Starr spun with under 40 laps to go and everyone pitted, Bell dropped from third to 10th. He finished 16th.

Virginia native Elliott Sadler of Emporia came out of retirement for the race and finished 12th.

Harvick wins pole

Kevin Harvick won the pole for Saturday night’s Monster Energy NASCAR Cup Series race at Richmond Raceway.

Harvick turned a fast lap at 124.298 mph for the 27th pole of his career and his second this season. He’s the first driver with more than one pole this season.

Erik Jones (Bryon, Mich.) will start on the outside of the front row, with Kurt Busch and Joey Logano in the second row. The top 10 also includes Kyle Busch, who will be seeking his third consecutive victory on the track, Martin Truex Jr., Chase Elliott, Austin Dillon, Daniel Suarez and Jimmie Johnson.

“For me, all three rounds went really good and we had a good race practice,” Harvick said.

A second scheduled practice was rained out.

NASCAR set each round of qualifying at just 5 minutes, leading some drivers to worry that there would be too many cars on the 0.75-mile track at once. When qualifying was over, though, that proved not to have been much of an issue, several drivers said.

“It was really just more congestion,” Harvick said.

Despite a solid starting spot, Logano was not a fan of the format.

“I think here it is not really a necessary thing because cars wanted to go out early and it doesn’t allow teams to cool off and go back out in the same round to improve their time,” he said. “I think you actually kind of lose a little bit of the drama of a car going back out and can that car knock the car that is on the bubble out.”