Andretti Autosport's Alexander Rossi clinched his first IndyCar pole position at Watkins Glen, edging four-time champion Scott Dixon.
Rossi's lap time of 1m22.4639s, a new track record, came in the final seconds of the 'Fast Six' section of qualifying, denying Chip Ganassi Racing's Dixon by little over half a tenth of a second.
Rossi, who had his deal with Andretti extended this week, was fast in practice, and had a very strong performance here in his rookie year in 2016.
Josef Newgarden was third fastest, 0.0001s slower than Dixon after running wide on his final lap, ahead of Indy 500 winner Takuma Sato.
Dixon's Ganassi team-mate Charlie Kimball was fifth, ahead of Helio Castroneves.
Championship leader Newgarden and Castroneves knocked out team-mate Will Power, as well as Andretti driver Ryan Hunter-Reay, in the final seconds of the second part of qualifying by just a few thousandths of a second.
Reigning champion Simon Pagenaud could only manage 12th, and was slowest of all in the second part of qualifying.
Graham Rahal, who was fast throughout practice, was only 10th fastest. He will start behind Sebastien Bourdais, who did not use the softer compound of tyre throughout qualifying.
Two drivers set to leave Ganassi at the end of the season, Tony Kanaan and Max Chilton, had a torrid time. They were slowest of all in their group.
AJ Foyt Enterprises team-mates Carlos Munoz and Conor Daly were separated by six thousandths of a second in the second group of qualifying. This ended up being the difference between that crucial sixth and seventh position in the group stage.
|1||Alexander Rossi||Andretti Herta||Dallara/Honda||1m22.4639s|
|2||Scott Dixon||Chip Ganassi Racing||Dallara/Honda||0.0529s|
|3||Josef Newgarden||Team Penske||Dallara/Chevrolet||0.0530s|
|4||Takuma Sato||Andretti Autosport||Dallara/Honda||0.1021s|
|5||Charlie Kimball||Chip Ganassi Racing||Dallara/Honda||0.3442s|
|6||Helio Castroneves||Team Penske||Dallara/Chevrolet||0.8711s|
|7||Ryan Hunter-Reay||Andretti Autosport||Dallara/Honda||0.5215s|
|8||Will Power||Team Penske||Dallara/Chevrolet||0.6348s|
|9||Sebastien Bourdais||Dale Coyne Racing||Dallara/Honda||0.6820s|
|10||Graham Rahal||Rahal Letterman Lanigan||Dallara/Honda||0.7601s|
|11||Carlos Munoz||AJ Foyt Enterprises||Dallara/Chevrolet||0.8320s|
|12||Simon Pagenaud||Team Penske||Dallara/Chevrolet||0.8342s|
|13||Spencer Pigot||Ed Carpenter Racing||Dallara/Chevrolet||1.0278s|
|14||Conor Daly||AJ Foyt Enterprises||Dallara/Chevrolet||1.0450s|
|15||Ed Jones||Dale Coyne Racing||Dallara/Honda||1.5212s|
|16||James Hinchcliffe||Schmidt Peterson Motorsports||Dallara/Honda||1.2215s|
|17||Tony Kanaan||Chip Ganassi Racing||Dallara/Honda||1.5343s|
|18||Jack Harvey||Schmidt Peterson Motorsports||Dallara/Honda||1.6751s|
|19||Max Chilton||Chip Ganassi Racing||Dallara/Honda||1.7373s|
|20||Marco Andretti||Andretti Autosport||Dallara/Honda||1.7140s|
|21||J.R. Hildebrand||Ed Carpenter Racing||Dallara/Chevrolet||1.9904s|