Nicky Hayden edged out world champion Valentino Rossi to take pole for the US MotoGP at Laguna Seca, California. The American Repsol Honda rider set a time of 1min 22.670secs, beating Rossi by 0.354secs with Brazil's Alex Barros a further 0.288secs back in third.
Italian Marco Melandri suffered his second fall of the weekend when he limped away after crashing at turn 10.
Britain's Shane Byrne was 19th, with compatriot James Ellison one place back in 20th.
Rossi was highly critical of the Laguna Seca track on the first day of practice when he could only manage ninth quickest.
The Italian, who has won six of this year's seven MotoGP races, said he was relieved to be on the front row of the grid.
"It was very important to get a good lap time today to start on the front row," Rossi said.
"Second place is very good because tomorrow it will be quite hard to overtake on this track."
Sunday's Grand Prix will be the first on US soil for 11 years.
1. Nicky Hayden (United States) Honda 1:22.670
2. Valentino Rossi (Italy) Yamaha 1:23.024
3. Alex Barros (Brazil) Honda 1:23.312
4. Troy Bayliss (Australia) Honda 1:23.358
5. Colin Edwards (United States) Yamaha 1:23.469
6. John Hopkins (United States) Suzuki 1:23.493
7. Max Biaggi (Italy) Honda 1:23.596
8. Carlos Checa (Spain) Ducati 1:23.597
9. Makoto Tamada (Japan) Honda 1:23.750
10. Shinya Nakano (Japan) Kawasaki 1:23.799