The July 2015 agreement to dissolve Iran's nuclear program has reshaped the country's relationship with the West, but just how much things at home have changed will be tested Friday in parliamentary elections. It's the first major political test for moderate President Hassan Rouhani, who was elected in 2013 on pledges to resolve the nuclear dispute, end Iran's diplomatic and economic isolation, and repair ties with the West.

Q: What exactly are Iranians voting on?

A: Voters will select members of the 290-seat parliament, or Majlis, which drafts laws and approves the president's Cabinet appointments. The current parliament has been a thorn in Rouhani's side, with a small group of hard-line opponents of the nuclear deal obstructing his agenda. Perhaps even more crucial, voters will also cast ballots for the Assembly of Experts, a body of 88 Islamic jurists who serve eight-year terms. Its makeup has taken on greater importance in this vote because the next assembly could select the successor to supreme leader Ayatollah Ali Khamenei, who is 76 and believed to be in deteriorating health. Put together, analysts say, it makes for the most consequential nonpresidential elections in Iran in decades.

Q: How free are the elections?

A: Not very. The Guardian Council, a group of jurists and theologians who supervise the elections, disqualified more than half of the roughly 12,000 candidates who had registered to contest parliamentary seats. The vast majority of those thrown out were reformists, who oppose the religious hard-liners' four-decade grip on politics. In three-quarters of constituencies, the reformist camp was left without names to put on the ballot, forcing it into an alliance with moderates.

Q: What are the battle lines?

A: Even with the disqualifications, the vote has shaped up into a contentious referendum on the nuclear deal, pitting hard-liners and opponents of the deal against reformists and their moderate allies, led by Rouhani. Unlike in 2004 and 2012, when reformist groups boycotted polls after mass disqualifications, the pro-Rouhani group is hoping that a large turnout will work in its favor and is encouraging supporters to back all of its candidates.

Q: What's the most likely outcome?

A: Polls indicate that moderate-reformist candidates will do well, and even if they don't gain a majority, the parliament is likely to be friendlier to Rouhani.

Q: Could the elections affect implementation of the nuclear deal?

A: For now, there is little prospect of Iran turning its back on the agreement. A recent deal to sell Iranian oil to France and buy 118 Airbus jets was a sign of the benefits that could come to Iran's economy in a post-sanctions era. Analysts say greater risk lies in the United States, where some Republican presidential candidates have said they would revoke the nuclear deal if elected. "Both electoral politics and congressional efforts to undermine the deal could push the Iranian leadership to start taking measures of their own that would eventually weaken the agreement," said Ali Vaez, senior analyst with the International Crisis Group. "There is no evidence on Iranian side that they want to give up on the deal. They're still hoping for the economic benefit, so it's too early to start thinking about undermining it."

Los Angeles Times