TEHRAN — President Hassan Rouhani won a resounding vote of confidence, and reformist allies won 29 out of Tehran’s 30 seats to parliament in elections that could speed Iran’s post-sanctions opening to the world, early results released on Saturday showed.

Tens of millions thronged polling stations on Friday for a twin vote for the 290-seat parliament and the 88-member Assembly of Experts, which selects the country’s highest authority, the supreme leader.