Sitting under an oak tree on a mountainside in the Kurdish region of Iraq, Mohammad Kurd said he recently fled neighboring Iran after two friends were killed by security forces and the powerful Islamic Revolutionary Guard Corps started going door to door to arrest antigovernment protesters.
His baggy khaki uniform, typical of Kurdish fighters, still looked new. In his thin coat, he shivered from the cold mountain air.
Mr. Kurd and a small number of others like him are the latest recruits of Komala, one of the armed Iranian Kurdish opposition groups that have been based in the mountains of the Iraqi Kurdistan region for decades.
“I am training so I can become a Peshmerga worthy of my people and those who have lost their lives in the revolution,” said Mr. Kurd, 27, using a term for Kurdish fighters. “A battle cannot be fought with pens and minds alone.”
Several thousand Iranian Kurdish opposition fighters are training here in the semiautonomous Kurdistan Region of Iraq for what they say is an unfolding revolution across the border in their homeland. But the groups are under increasing pressure from all sides.
Iran has been attacking their mountainside bases with missiles and drones, forcing the fighters to disperse into tents scattered higher up the mountains. The Iraqi central government, based in Baghdad to the south, wants the Iranian groups to disarm. And increasingly, they are at the center of escalating tensions between the two countries.
The Iranian attacks have targeted their strongholds over the past two months as part of a wider crackdown aimed at crushing a protest movement that rose up following the death of Mahsa Amina, a young Iranian Kurdish woman. She died in the custody of the morality police in September after being accused of dressing immodestly.
The Iranian strikes are both an expression of rage at the opposition presence in Iraq and a reminder of the vulnerability of the fighters, who are tightly constrained by their Kurdish Iraqi hosts.
Kurds are an ethnic minority in both Iran and Iraq. But in Iraq, they wield far more power, governing an entire semiautonomous region in the north of the country created with the help of a U.S.-led no-fly zone in the 1990s. Almost all of the Iranian opposition groups based there consider an independent Kurdish state an unattainable dream for now, and call instead for self-rule for the Kurdish regions within Iran.
The Kurdistan regional government in Iraq — which walks a tightrope between supporting Kurdish solidarity and inflaming Iraq’s powerful neighbor — bars the fighters from moving across the border into Iran.
On Monday, an Iranian commander warned specific villages, towns and neighborhoods in the Iraqi Kurdistan region that they would be targeted next for harboring opposition figures.
If Iran were to target civilian areas, it would be a significant escalation of attacks that have so far been directed mainly at the bases of the Iranian opposition groups. Missile and drone attacks on those bases at the end of September killed at least 18 people, including two women and a child, according to the opposition groups and hospital officials.
Most of the protesters who have fled Iran and sought refuge in Iraqi Kurdistan have come from Iran’s Kurdish provinces, where the antigovernment demonstrations over the past two months have been particularly virulent. Activists say there are no reliable estimates of the number of protesters who have fled Iran. A minority of them have signed up to be fighters.
In his home city of Divandarreh, Mr. Kurd drove a bus and transported small electrical appliances for sale on the black market — work that carried the risk of being shot by security forces. Like many protesters, he said he was angered that Iranian leaders spent the country’s wealth on conflicts in Syria, Iraq and Yemen while its citizens went hungry.
Among his other grievances with Iran’s authoritarian rulers, he said that in his own region, Kurds should have the right to be educated in their native language, Kurdish, but are barred from doing so.
In September, when the current wave of antigovernment protests began, Mr. Kurd said one of his friends, a 29-year-old shopkeeper, was shot and killed as he tried to knock down a security camera. Another friend, a tailor in his late 30s, was shot in the stomach and died four days later, he said.
He then decided to try to cross the closed border to Iraqi Kurdistan and joined a wave of pilgrims who stormed the frontier during a religious holiday, making it across without being checked.
An official with Komala, formally known as the Komala Party of Kurdistan, said four or five other protesters had joined the group in the past two weeks for military training at their mountain base. Among them was a 20-year-old university student joining her mother who was already in the camp.
Near the base of the mountain about 50 miles from Iran, houses hit by missile strikes in September lay in ruins. Some bore stenciled images of executed and assassinated leaders from the movement’s history.
At a small bakery, one fighter sang a love song as he made paper-thin sheets of bread.
Since 1986, when Komala established its base in Iraq’s Kurdish region during the Iran-Iraq war, its fighters have dreamed of a revolution back home. Now, older opposition leaders are pinning their hopes on the young Iranians leading the protests inside Iran.
“Millions of Iranians went to the front lines to protect Iran during the Iran-Iraq war,” said Nevid Mehrawar, a member of the Komala leadership. “Now their sons and daughters are saying, ‘My father didn’t give his life for this dictatorship.’”
Iran has demanded that the Iraqi Kurdish regional government and the central government expel or disarm Iranian fighters or put them in closed camps. An Iranian commander on Monday said his country had launched its attacks on the opposition groups in the Kurdistan region when that did not happen.
Iraq’s new government is dominated by Iran-backed parties that also want the bases shut and the fighters disarmed. But the new Iraqi prime minister said this month that leaders of the Iraqi Kurdistan region had refused.
Iran has accused Komala and other opposition groups of being separatists responsible for recent killings in Kurdish-majority Iranian provinces and of fomenting the demonstrations, but it has provided no proof.
Mr. Mehrawar said Komala had about 1,000 fighters in Iraq and was armed for self-defense. He said it was not launching armed attacks inside Iran because it wanted to avoid undermining what he described as a civil revolution underway.
Another armed opposition group, the Democratic Party of Iranian Kurdistan, has been among the hardest hit in the Iranian attacks since September. Eleven people have been killed on its bases near the Iraqi Kurdish city of Koya, according to party and hospital officials.
Mustafa Mauludi, 63 and a member of the group’s leadership, said he joined it 43 years ago.
“We won’t leave and we won’t give up our weapons,” said Mr. Mauludi. “Neither Iraqi forces nor Kurdish forces can protect us.”
Another of the opposition groups, the Kurdistan Freedom Party — known as P.A.K. — fought with U.S.-backed Iraqi Kurdish forces against the Islamic State terrorist group when it invaded northern Iraq in 2014. Now, at its base near the border of Iraq’s Kirkuk province, it helps hold the line against ISIS, but is also within sight of hostile militias backed by Iran that are part of the Iraqi government forces.
Nine of its fighters were killed in the Iranian attacks in September.
P.A.K.’s leader, Hussein Yazdanpana, 56, said groups like his are not at the forefront of the Iranian antigovernment movement.
“The leaders of this struggle are on the streets in Iran,” he said.
After years of division, many of the Iranian opposition parties in Iraq are now in talks to unite and present a more effective front, something that they say could benefit the broader antigovernment movement across Iran.
“The weakest point is there is no united opposition against the Iranian government,” said Siamand Moeini, co-leader of another Iranian opposition group, the Free Life Party of Kurdistan.