HAMPTON, Georgia (AP) -- Ricky Stenhouse Jr. won the first NASCAR Sprint Cup pole of his career on Friday at Atlanta Motor Speedway.

His previous best qualifying effort of a difficult first full Cup season was third at Kansas.

"When we unloaded the car, we weren't very good," Stenhouse said. "We kept making changes, making big changes, and got it where we needed to be."

Carl Edwards, a teammate at Roush Fenway Racing, had posted the fastest time of the night running a high line before Stenhouse, one of the last drivers to qualify, pulled onto the track.

"We were sitting in the trailer after practice," Stenhouse said. "Jack (Roush) asked me what line I was going to run in qualifying. Having a late draw, I thought whoever was on the pole at the time, I would run the same line. Well, Jack didn't want to hear that. He wanted to hear that I was going to run on the bottom. He said it makes him less nervous."

Even so, Stenhouse waited as long as possible before committing to the low line.

"I was probably three-fourths of a way down the front straightaway still contemplating whether to go bottom or top," he said. "I felt like I got through (turns) one and two really good. I knew I just had to maintain it through three and four. I was able to do that."

Edwards wound up second-fastest, giving him a starting spot on the outside of the front row for Sunday's race -- the penultimate event before the Chase for the Sprint Cup championship begins.

"I thought there was no way he could beat us if he ran on the bottom," Edwards said. "I give Ricky a lot of credit for not changing his line after seeing how fast we were on top. He stuck to his guns."

Stenhouse has struggled as a Cup rookie, ranking 23rd in the points and still looking for his first top-10 finish. For now, he's best known as the boyfriend of fellow Cup rookie Danica Patrick.

"It's good to finally get something accomplished this year," Stenhouse said. "We've not accomplished what we thought we should or the goals we set out to get."