ERBIL, Iraq (Reuters) - Iraqi Kurdish leader Jalal Talabani, who died on Tuesday aged 83, spent decades fighting for his people’s independence but then became president of Iraq after the overthrow of Saddam Hussein and struggled to unite the deeply fractured country.

FILE PHOTO: Iraqi President Jalal Talabani adjusts his glasses during a news conference following a meeting with Italian Prime Minister Silvio Berlusconi at Chigi Palace in Rome November 8, 2005. REUTERS/Alessandro Bianchi/File Photo

His death, in Germany, came barely a week after the Kurds of northern Iraq voted overwhelmingly for independence in a referendum condemned by Baghdad and Iraq’s powerful neighbors Turkey and Iran who fear it will destabilize the wider region.

A veteran of the Kurdish guerrilla movement, Talabani survived wars, exile and political infighting among the Kurds to become Iraq’s first non-Arab president in 2005, two years after the U.S. invasion that toppled Saddam.

The Iraqi presidency post-Saddam is a largely ceremonial post, but Talabani, forceful yet charming, proved a pivotal mediator among Iraq’s fractious Shi’ite, Sunni and Kurdish parties, and he stayed on as head of state until 2014.

Despite his calls for Iraqi national unity, the man known affectionately among Kurds as ‘Mam’ -- or uncle -- was always a fierce champion of the Kurdish cause, fighting Saddam for decades and pushing for federalism to benefit the semi-autonomous region in the north.

While sectarianism and attacks by al Qaeda engulfed most of Iraq after 2003, triggering a civil war between Shi’ites and Sunnis, the Kurdish north remained relatively stable and safe.

Iraq’s Kurds are now closer than ever to realizing their dream of independence after decades of oppression under Saddam Hussein, followed by years of tensions with the Baghdad government over oil and other issues.

However, Talabani’s Patriotic Union of Kurdistan (PUK) - and his wife and companion in political struggle, Hero - voiced only lukewarm support for the Sept. 25 referendum. Talabani was too ill by then to comment publicly on the vote.

RIVALRY

The referendum was organized by Talabani’s longtime rival Massoud Barzani, head of the Kurdistan Regional Government (KRG). The split between Barzani’s Kurdish Democratic Party (KDP) and Talabani’s PUK raises questions over the future of Iraqi Kurdish politics.

Talabani’s PUK, unlike Barzani, has traditionally good ties with Tehran. Iranian-backed Shi’ite groups wield considerable power in Iraq.

Born in 1933, Talabani studied law at Baghdad University, joined the KDP in 1946 and by his mid-twenties was a member of the inner circle, a top lieutenant to the independence movement’s patriarch, Mullah Mustafa Barzani.

He split from the party and formed the PUK in 1974. A damaging rivalry developed with Barzani and his son, Massoud.

Talabani regarded himself as a modern, socialist and urban alternative to the tribal authority wielded by the elder Barzani and much of the PUK’s support comes from the urban elite.

Talabani’s harshest lesson came in 1988 when Iraq gassed Kurdish towns near the Iranian border during an Iranian-PUK offensive in the waning days of the Iran-Iraq war.

In the brutal seven-month Anfal campaigns, Kurds accused Iraqi forces of killing tens of thousands of men, women and children and relocating many more. Many remain missing, despite the discovery of mass graves, and no one knows for sure how many were “Anfalised” as Kurds call the killings and disappearances.

Most independent estimates put the figure at about 100,000. Many Kurdish leaders put it at more than 180,000.

Following their uprising against Baghdad after the 1991 Gulf war, Iraqi Kurds saw their first shot at self-rule go up in smoke when Talabani and Barzani sparred over control of a provisional north Iraq government elected in 1992.

That bickering escalated into a civil war that saw the KDP enlist Baghdad’s help against the Iranian-backed PUK.

A U.S.-sponsored truce backed with the threat of a diplomatic embargo took hold in 1998 and the two factions developed parallel, cooperating administrations.

Talabani’s speeches often reminded Kurds of their suffering at the hands of Saddam Hussein. But he and other Kurdish leaders faced unrest from Kurds more concerned with poor services in their towns and villages than the painful past. Talabani suffered a stroke in 2012 while still serving as Iraqi president and underwent lengthy medical treatment, mostly in Germany.

One of his sons, Qubad, is the current deputy prime minister of the KRG in northern Iraq.