SONOMA, Calif. — As Jamie McMurray turned a corner on the season with a string of solid finishes, he picked Sonoma Raceway as an upcoming track he was looking forward to racing.

It seemed like a strange selection considering McMurray has just one top-10 finish at Sonoma in 10 career starts.

But he showed his comfort level on the 1.99-mile road course Saturday with a surprise pole-winning run. He topped Marcos Ambrose, a race favorite, with a lap at 94.986 mph.

"I felt like I've always raced really well here," McMurray said of choosing Sonoma as a place he thought he could win this year.

"For me, the last restarts have really got me. When you have a restart at this track, guys go from top-five to 30th in about 20 seconds. It can be a track that if you have a caution at the end, you can lose a lot."

It was McMurray's ninth career Sprint Cup pole, but first of the year. He also won the pole at Sonoma in 2007.

Ambrose wound up second with a lap at 94.924 in NASCAR's first use of the group qualifying format. Both Ambrose and McMurray were together in the final group, and Ambrose initially had the pole position. But McMurray snatched it away, and Ambrose made a second attempt to grab it back but came up just short.

"The motor quit running coming to the green flag, so I lost all of my momentum coming to the green flag," Ambrose said. "I thought about just bailing out of that lap and trying to roll around for a second lap, but I wasn't sure about engine temperatures and the tires go away so fast. I didn't know if I had already stressed them out and if I could have made up time, so I just went for it."

It's not the first engine issue Ambrose has had at Sonoma: He was dominating the race in 2010 and leading under caution when he turned his engine off and lost the race. So he was furious when an engine problem spoiled what he thought would be a pole-winning run for Sunday's race.

"I pretty much lost my mind there and was really mad and just had to get my composure back to finish the lap off," he said. "It was good enough for the front row, so I'm proud of that but disappointed obviously that we didn't get the pole position."

Carl Edwards qualified third and was followed by teammate Greg Biffle as Ford drivers took three of the first four spots. Although it was Edwards' best qualifying effort at Sonoma, he had thought the new format meant he'd get more laps in and have a shot at the pole.

"The qualifying format was supposed to be easier on the drivers because we were supposed to get a couple of laps, but my crew chief went ahead and taped the grille off and said that we'd just get one lap, so I was really happy with the lap," Edwards said. "I made a couple of little mistakes. I think I could have done better, but, still, it's the best position I've had starting here and to be anywhere near Marcos Ambrose in qualifying at a road race is an honor for me."

Defending race winner Clint Bowyer qualified fifth and was followed by Matt Kenseth, Kurt Busch and Joey Logano. Kyle Busch was ninth, and Jeff Gordon rounded out the top 10.

NASCAR had previously used group qualifying only in the Nationwide Series but tried it Saturday instead of traditional single-car runs. The drivers were split into eight groups of five or six cars based on practice speeds from Friday, and NASCAR sent them onto the track five seconds apart.

The drivers had five minutes to post a fast lap.

It was immediately interesting as Victor Cruz Jr., driving for Tommy Baldwin Racing, ran off course and into a barrier to stop the first group's session.

"Rookie mistake," he said.

There was no mistake for McMurray, who enjoyed watching the qualifying format as he waited for his turn to run.

"It was cool how people would bump each other off," he said.

When he went out in the final group, he was smooth and steady in his Chip Ganassi Racing Chevrolet and didn't push too hard.

"I was like, 'I'm just going to go out and take what this car will give me and not push it to the very edge,'" he said. "I drove at about 95 percent."

McMurray teammate Juan Pablo Montoya qualified 13th.

Jacques Villeneuve, in the Phoenix Racing entry Kurt Busch drove to a third-place finish last year, qualified 22nd.

"It just wasn't quick enough," he said. "We improved the car overnight and I was discovering it and I just didn't drive aggressive enough on the first lap, so there was still a little bit of time, but at least my car was a lot better."

Danica Patrick, who has struggled to find speed all weekend and was expected to be strong Sunday, qualified a disappointing 31st.

"We picked up from practice. It was loose, especially in the faster part of the course," Patrick said. "But we improved from yesterday and the GoDaddy guys have worked really hard this weekend. Hopefully we have a good day on Sunday."