Iran's protests feature demonstrators upset with the country's lackluster economy and nearly four decades of rule by hard-line Islamic clerics.

Those are the basics, but there is much more behind this latest round of unrest.

Iran is a complicated place, marked by multiple factions all trying to pull the country in different directions.

There is one supreme cleric in charge. But there is also an elected president and robust political debate. While not a democracy, neither is Iran a dictatorship.

In addition, most foreign journalists are barred from the country and the Iran government has shut down some social media channels inside the country.

Here's a primer on some of the key players and what's at stake for them:

Supreme Leader Ayatollah Ali Khamenei: The man who has the final word on all major decisions, Khamenei has consistently advocated deeply conservative positions at home and has been relentlessly critical of the West.

He doesn't often comment on day-to-day developments, and issued his first remarks about the protests Tuesday, five days after they began.

"In the recent days' incidents, enemies of Iran utilized various means - including money, weapons, politics and intelligence apparatuses - to create problems for the Islamic system," Khameni said in a brief statement posted on his official website.

The comment was very much in keeping with Khamenei, who has packed the government with conservative clerics and has long had close relations with the security forces.

Khamenei served two terms as president in the 1980s and then became the country's supreme leader after the 1989 death of Ayatollah Khomeini, the man who established the Islamic Republic.

No current Iranian figure has played a more central role in the nearly four decades since the 1979 revolution. Khamenei is now 78, which prompts periodic speculation about his health. But he remains the nation's dominant figure and no one doubts his hard-line attitude toward the protesters.

President Hassan Rouhani: Elected to a second four-year term last year, Rouhani portrays himself as a pragmatist who wants a more modern Iran that's reaching out to the world.

The protests are seen as a major test for Rouhani.

The president faces rivals among the hardliners who would like to see the protests crushed. Yet he also faces criticism from moderates and liberals who say he's a long-time pillar of the establishment and is unable or unwilling to make major changes to the system of clerical rule.

Rouhani was the leading Iranian voice in support of the 2015 nuclear deal with the United States and other world powers. While this resulted in the lifting of some sanctions, it has not brought significant economic gains for ordinary Iranians as Rouhani promised.

Rouhani has been targeted by many protesters, and he has acknowledged their right to demonstrate.

"According to the constitution and citizens' rights, people are free to express their criticism and to protest," Rouhani said in remarks broadcast on state television Sunday.

However, he also warned: "The government will show no tolerance for those who damage public properties, violate public unrest and create unrest in the society."

The Protesters: The demonstrations broke out unexpectedly on Dec. 28 in the conservative, religious city of Mashad, the second largest city in Iran. The protests appear to be a reaction to government proposals to cut subsidies that keep prices down, though demonstrators have also called for the ouster of the country's leaders.

Some Rouhani allies accused the hard-liners of stoking the demonstrations to make Rouhani look bad.

"This began over economic issues," Robin Wright, a long-time Iran watcher who writes for The New Yorker, told NPR's Morning Edition. "Now it has taken on a political component, challenging not only the government of President Rouhani, but also the broader religious system."

There's no clear leader among the demonstrators, which spread around the country almost immediately. Nationwide, more than 20 people have been killed, one a member of the security forces, according to media reports in Iran.

Many note that the protests have not been centered in Tehran but scattered around the country, often in small cities. Protesters are largely people in their 20s complaining about economic hardships. That's a change from the big protests in 2009, when Tehran residents led the charge and called for more personal freedoms. It could be a sign of more widespread, working class dissatisfaction.

Iran's demographics are tilted toward the young, many of whom are seen as frustrated by the limited opportunities, the country's relative isolation and the older, hard-line religious leaders who have been in power for decades.

Some of the areas experiencing violence also have complicated ethnic makeups, including Kurdish, Arab and Sunni minorities, hinting at long-standing grievances against the Shiite regime.

The Iranian Security Forces: In 2009, protests against the allegedly rigged results of the presidential election were crushed by Iran's security forces. The question now is whether this time they will do the same.

Most powerful is the Iranian Revolutionary Guard Corps (IRGC). It's basically an army that reports to Khamenei, with missiles, tanks and troops around the region. The IRGC also controls the street militias that help enforce clerical rule.

Security forces seem intent on limiting the unrest in Tehran. Media reports Tuesday, quoting a deputy governor of Tehran, said at least 450 people have been arrested in the city, the largest portion of the more than 600 arrested nationwide.

It's important to remember that there is a connection between the Revolutionary Guard Corps and economics. In addition to being an army, the IRGC controls large companies and holds big financial interests. Iranians complain that money meant to help ordinary Iranians is being funneled to the IRGC instead.

These demonstrations are being described as the largest since the disputed presidential election in 2009. As those demonstrations spread, the IRGC and other security force branches were increasingly aggressive in dealing with the so-called Green Movement, which challenged the election results. The protests lasted months, and while figures varied, the death toll was in the dozens while thousands were arrested.

Greg Myre is a national security correspondent. Follow him @gregmyre1.

Copyright 2018 NPR. To see more, visit http://www.npr.org/.