Honda rider Marquez saved the best for last to complete the fast lap in 2mins 2.741 secs to edge his Spanish compatriot, a Yamaha rider who won this season's two opening races at Qatar and Argentina, by 0.130 of a second.

"This pole makes me feel really good because I honestly didn't expect it," Marquez said. "Actually I thought it would be difficult. In fact, even considering that this circuit suits my riding style, I've been struggling a bit this weekend.

"We knew that our opponents were very strong on new tires and we worked a lot on race distance and I felt better on race pace than on qualifying pace.

"But anyway, this is a track I love, so I told myself, 'Let's try,' and on my last lap I pushed to my maximum, doing my best, and we got another pole here in Austin which is very good."

Vinales's teammate, Italy's Valentino Rossi, completed the front row in another late charge for third in 2:03.673.

The front-row fight sets the stage for a showdown of the Spaniards in Sunday's race over a 20-turn layout where Marquez has swept every GP race contested but Vinales has swept the 2017 start, winning two weeks ago in South America after Marquez crashed out early.

"We changed many things on the bike over the weekend and step-by-step we regained some confidence," Marquez said. "So this afternoon we just focused on keeping a good pace and it worked well."

Spain's Dani Pedrosa, a Honda rider who has twice made trips to the Americas podium, was fourth and will be joined on the second row by French rookie Johann Zarco (Yamaha) and Spain's former world champion Jorge Lorenzo (Ducati).

Italy's Franco Morbidelli, seeking his third Moto2 win in a row to boost his season points lead, took the pole in 2:09.379 with compatriot Mattia Pasini 0.167 of a second back in second. Spain's Alex Marquez was third in 2:09.671 with Japan's Takaaki Nakagami fourth as the fasted five qualifiers were Kalex riders.

Spain's Aron Canet smashed the Moto3 one-lap circuit record by seven-tenths of a second to grab his second career pole in 2:14.644.

The Honda rider, seeking his first victory, beat Spanish series points leader Joan Mir, winner of the season's first two races riding a Honda, by .987 of a second with defending race champion Romano Fenati of Italy, also on Honda, in third, another .01 adrift.