Martin Truex Jr.’s expectations were pretty low entering the final round of qualifying Thursday for Sunday’s Coca-Cola 600 at Charlotte Motor Speedway.

Truex’s Toyota was 12th fastest in the first round and fifth in the second round.

Then came the final round, during which Truex’s No. 78 Toyota found enough speed to overtake Joey Logano. Truex’s lap of 192.328 mph was good enough for the pole.

“It was one of those Charlotte deals where the track was continually changing,” said Truex. “We never got it close to right until that final round.”

Qualifying began in the daylight at 7:15 p.m. By the time it was over about an hour later, it was nearly dark.

“With the track changing quite a bit, we were able to fix the problems that I was having,” said Truex. “It all came together when it counted.”

It was Truex’s ninth career pole, his second of the season and first at Charlotte.

Logano, who won last week’s all-star race at Charlotte, led the way through the first two rounds, but slipped up going through Turns 1 and 2 on his final lap. That cost him about one-tenth of a second, enough to fall behind Truex.

“The car had speed that transferred over from last weekend, at least in qualifying trim,” Logano said. “We have an understanding of what what to do go fast, we just came up short. It’s frustrating after winning the first two rounds. You feel like you’ve won twice and you should be on the pole.”

Logano was one of five Ford drivers in the top 12, joining Ricky Stenhouse (third), Brad Keselowski (fifth), Greg Biffle (sixth) and Trevor Bayne (10th). It was the first time since the Texas spring race of 2014 that Roush Fenway Racing had three cars – Stenhouse, Biffle and Bayne – in the top 12.

Dale Earnhardt Jr., Jimmie Johnson and Aric Almirola all received their fourth cumulative warnings Thursday and lost their pit selections for Sunday’s race. The warnings were for prequalifying laser inspection and template violations. Johnson qualified seventh, Almirola 20th and Earnhardt 25th