TEHRAN — Iranians in middle-class areas of the capital stood in long lines to vote in national elections on Friday, with many saying they supported the few candidates seeking change who were allowed to run. But in less prosperous areas, there was much less enthusiasm, and turnout seemed lower.

“At least if I vote for a reformist, I will reduce the number of hard-liners,” said Shahin Hemati, a 28-year-old dentist, expressing a widespread attitude in the more affluent areas. “If the hard-liners are voted in, this will be a nightmare for me.”

In a great number of cases, however, the outcome of the voting was predetermined, as the candidates were vetted by the Guardian Council, a panel dominated by hard-liners. Thousands of candidates, most of them reformists, were disqualified, assuring they would remain in the minority and limiting President Hassan Rouhani’s ability to make promised changes to end the country’s isolation and to expand personal liberties.

Iranians were voting for two separate bodies, Parliament and the Assembly of Experts, a clerical council that could elect the successor to the supreme leader, Ayatollah Ali Khamenei. He is 76 and has had some health problems, though he appears vigorous now.