An Iraqi Kurdish man shows his 10 ink-stained fingers after casting his vote Monday in the Kurdish independence referendum in the city of Kirkuk in northern Iraq. (Ahmad Al-Rubaye/AFP)

ISTANBUL — Nearly every Middle East government was opposed to Monday’s vote for independence in the Kurdish region of Iraq. But not so just across the border in the cities and towns of western Iran.

There, thousands of Iranian Kurds, jubilant for their Iraqi kin, staged demonstrations in support of the vote. (Iran is home to roughly 8 million Kurds. The rest of the region’s Kurdish population is spread across Iraq, Syria and Turkey.)

Crowds waving glowing cellphone screens marched in main squares in places including Baneh, Sanandaj and Mahabad, the capital of a short-lived republic declared by Kurds in 1946. Images posted on social media showed demonstrators singing the Kurdish national anthem, chanting for “freedom!” and in some cases marching past Iranian security forces. No clashes were reported.

But Tehran is also concerned about unrest within its own borders, where Kurds have long complained of discrimination and widespread rights abuses. The armed wing of the Kurdish Democratic Party of Iran, or KDPI, which is based in Iraq, ended a years-long cease-fire with Iran’s Revolutionary Guard last year. The two sides have engaged in low-level clashes, and on Monday the party circulated images from the protests.

Still, having spent decades in exile, Iran’s Kurdish parties remain weak, and it is unclear if the leaders can mobilize their own campaign for self-rule. In the past, the KDPI has said it wants autonomy for Iranian Kurds, but within the framework of a democratic Iran.

In Turkey, the military has battled Kurdish separatists for decades. Meanwhile, Syria’s Kurdish militias have forged alliances with the United States in the fight against the Islamic State.

Galip Dalay, research director at Al-Sharq Forum in Istanbul, wrote in Foreign Affairs this month: “Even though the Iranian regime continues to execute dozens to hundreds of Kurdish dissidents every year, Iranian Kurds have not effectively sought to change their fate or utilize their power.”

“Iranian Kurdish politics have remained largely unresponsive to the general regional upheaval and even to major developments inside Iran,” Dalay wrote.