Conservative rivals of President Mahmoud Ahmadinejad are leading in the race for Iranian parliament seats, according to early election results. In a huge embarrassment, Parvin Ahmadinejad, a younger sister of the president, was defeated by a conservative rival in their hometown of Garmsar.

The conservatives' lead was expected as the elections boiled down to a contest between conservatives supporting and opposing Ahmadinejad.

Early returns on Saturday in the capital, Tehran, showed loyalists to the supreme leader, Ayatollah Ali Khamenei, were pulling ahead. Partial results from provincial towns showed conservative Ahmadinejad rivals elected in many constituencies.

The results indicate Ahmadinejad may face a more hostile parliament in the nearly two years remaining of his second term in office.

The authorities in Tehran attempted to portray a country united amid threats of war and western economic sanctions as Iranians went to the polls on Friday for the first time since the bitterly contested elections of 2009.

Iran's state television broadcast rolling coverage of the parliamentary elections, which began at 8am local time, showing hundreds of people queuing up in polling stations across the country to cast their ballots in what has been described as the most sensitive vote in the history of the Islamic republic.

Iran's supreme leader, Ayatollah Ali Khamenei, whose authority as the man with the ultimate power in the country was challenged by the protests that followed the allegedly rigged results in 2009, was one of the first people to vote before television cameras.

"Whenever there has been more enmity towards Iran the importance of the elections has been greater," he said. "The arrogant powers are bullying us to maintain their prestige. A high turnout will be better for our nation … and for preserving security." The ayatollah described voting as a religious "responsibility" like that of Namaz, the Muslim practice of prayer five times a day.

With political discontent at home and international pressure making the regime vulnerable, turnout will be a litmus test for the legitimacy of its leaders.

Iran's opposition, crushed in recent years and banned from running in the elections, largely called for a countrywide boycott of the vote. Many activists sympathetic to the Green movement took to social networking websites to urge Iranians to embarrass the regime by staying at home. Some distributed leaflets reading "I won't vote". For the opposition it was a non-event, although some Iranian politicians affiliated to the opposition, including former presidents Mohammad Khatami and Akbar Hashemi Rafsanjani, participated. Some believe they were forced to.

"In the past few decades I have always participated in elections held in this country despite my hatred for the regime, because I always believed in reform," a member of the Iranian opposition told the Guardian from Tehran, asking not to be named for fear of reprisal. "But after the events in 2009 I finally gave up and sat at home this time."

Human Rights Watch, a New-York based organisation that has closely monitored the situation of activists and campaigners in Iran, issued a statement on Thursday, warning that a fair vote was impossible in the country. "Iran's parliamentary elections … will be grossly unfair," HRW said. "[It] follows the disqualification of hundreds of candidates based on vague and ill-defined criteria, and opposition leaders are either barred from participating, serving unjust prison sentences, or refusing to participate in what they consider sham elections."

The opposition leaders Mir Hossein Mousavi and Mehdi Karroubi were placed under house arrest in February 2011.

Despite the boycott, reports from Iran suggested many people, especially those in small and conservative cities, participated in the vote. Since 2010 the Iranian government has run a scheme of direct monthly payments to families in compensation for a cut in subsidies. Although the money (almost $37) does not catch the eyes of middle-class Iranians, it has been popular with poorer families who are believed to have voted in relatively large numbers.

"It was a quiet day in Tehran, even from the state television's broadcast you could see that only old people were voting," said Hamed, a Tehran resident. "However, I think people in small cities who have little access to information and are pleased with the government's payments would vote, although I think the turnout would be less than 30%."

Iran's interior minister, Mostafa Mohammad-Najjar, was quick to predict a high turnout and Tehran's governor, Morteza Tamadon, said there was a record vote in the capital.

In the runup to the elections Ayatollah Makarem Shirazi, an influential cleric, issued a religious ruling that to not vote would be a sin. The wife of an assassinated nuclear scientist also urged people to vote. Iran's leaders warned that they would consider any attempt to encourage an electoral boycott as a crime.

In the absence of the opposition, Friday's parliamentary vote was a battlefield for factions within the establishment, fighting each other for a greater share of power. It could also be decisive for the future of a power struggle between supporters of the president, Mahmoud Ahmadinejad, on one side and conservatives close to Khamenei on the other.

Some observers believe that the results will only consolidate Khamenei's power more than ever in the parliament, making an already lame-duck president more isolated. Ahmadinejad's term ends in 2013.

Foreign media were largely not allowed into Iran to cover the elections and those in the country could not operate freely. "This is the 1st election I've covered anywhere in the world where authorities ordered reporters on buses to cover vote, " Ivan Watson of CNN tweeted. "Visiting foreign journalists covering the election in Tehran have all been sent back to their hotels and told to stay put," tweeted another journalist, Jason Rezaian.

More than 48 million Iranians are eligible to vote in the Majlis elections.