"That was a tough qualifying session," Hamilton said.
"The weather was going up and down and we didn't really know what to expect...
"I didn't know whether or not I had the pole. The last lap wasn't that great, if I'm honest."
Mercedes will seal the constructors' title on Sunday unless Ferrari outscore them by 13 points.
Hamilton's teammate Valtteri Bottas, who was on pole in Brazil last year, qualified third with Ferrari's Kimi Raikkonen fourth on an all-Finnish second row.
Red Bull's Max Verstappen qualified fifth with Australian teammate Daniel Ricciardo sixth but dropping five places for Sunday's race due to a penalty for having a turbocharger replaced.
"I think we have a good car and in qualifying to be half a second off pole around here, where from memory we haven't been that close in the past, is positive," Ricciardo told redbullracing.redbull.com.
"We also know from yesterday that we are even better in race conditions.
"Obviously, with the penalty I start a bit outside of the front pack in 11th but I will hopefully make my way through quickly and have some fun once I join the fight at the front.
"Anyway, whatever happens it'll be fun."
Hamilton and Vettel provided the main talking points of the session, with the former fortunate to escape the immediate attention of the stewards after nearly colliding with the Williams of Russian Sergey Sirotkin in the second phase.
Vettel's summons by the stewards was inevitable after he was called in for weighing at a critical point in the second phase with rain threatening, making it crucial to get in an early timed lap.
With a cone barring access to the weighbridge, he drove into it and then gesticulated angrily for officials to hurry up, before driving off again in a breach of the regulations - damagin the equipment in the process.
"They shouldn't call us when the conditions are changing like that, I think it's unfair if somebody gets pulled in. I wanted them to hurry up," said Vettel.
Stewards handed the four-time world champion a reprimand for failing to follow instructions, his first of the season, and a 25,000 euros ($A40,000) fine.