LOUDON, N.H. (AP) - Denny Hamlin has won the NASCAR race in New Hampshire, getting the mistake-free trip he needed to win for the series-leading fifth time this year.

Jimmie Johnson finished second and took the lead in the Chase for the Sprint Cup. Jeff Gordon was third.

Hamlin's crew avoided the mistakes that dogged them here in July and in Chicago last week, when he ran out of gas and finished 16th. On Friday, Hamlin had another setback when his crew had the wrong pressure in his tires and he qualified 32nd.

Quickly moving up in the field, Hamlin took the lead for the first time on the 94th lap and led for 193 laps in all, getting some help when teammate Kyle Busch helped pull some debris off the front of Hamlin's car.

Copyright 2012 by The Associated Press. All rights reserved. Material may not be redistributed.

More From KSOO-AM / ESPN Sioux Falls