Gen. Mustafa Barzani, the colorful guerrilla chieftain who unsuccessfully fought for Kuraish independence in Iraq for more than 15 years, died Thursday evening at Georgetown University Hospital following a heart attack. He was 76.

Gen. Barzani, who was known to his followers as "the grand old man of Kurdish independence," came to the United States in June 1976. He was suffering from lung cancer and underwent treatment at the Mayo Clinic in Rochester, Minn. He lived in Washington, and at the time of his death, in McLean.

His exile here began a year after the collapse of his final campaign before an onslaught by the Soviet-equipped Iraqi army in the spectacular mountain regions that are the homeland of the Kurds.

The military defeat followed a political disaster. In March 1975, Iran withdrew its support for the Kurds as part of the settlement of a border dispute with Iraq.The two nations had been on the point of open war over the Kurdish question. The settlement of the border question defused this threat and with it what some regarded as a much wider threat to stability in the Middle East. Thus. the United States supported it.

Gen. Barzani and about 200,000 of the estimated 2 million Kurds living in northeastern Iraq fled to Iran, which offered them the choice of remaining -- there is a sizable Kurdish population in lran -- or of returning to Iraq.

Shortly before he fled, Gen. Barzani told an interviewer "Sometimes things are good. Sometimes they are bad. Now they are bad. It is a fact of life."

Ironically, Shah Mohammed Reza Pahlevi of Iran, who had withdrawn Iranian support of the Kurds, also was in Xile at the time of Gen. Barzani's death, having been forced to leave his country by the revolution of supporters of the Aytollah Ruhollah Khomeini.

Gen. Barzani's departure from Iraq in 1975 ended a 17-year peroid in which he was the most visible of Kurdish leaders. In 1958, he had returned from an 11-year exile in the Soviet Union to a hero's welcome in Baghdad, the Iraqi capital. The Iraqi army had just overthrown the Britishbacked Hashemite dynasty and had launched Iraq on a path of socialism and intense Arab nationalism.

At first, it appeared that the new regime would be agreeable to allowing the Kurds a measure of autonomy. When these hopes failed, Gen. Barzani led his troops, the Pesh Merga, which means lorward to death," into battle.

The war continued intermittently for 10 years. In 1970, the Iraqis, their resources sorely strained by the effort, agreed to give the Kurds substantially what they wanted. They were to have their own local government and armed froces, five seats in the Iraqi cabinet and a vice presidency.

On however small a scale, this would have been the realization of a Kurdish dream. The Kurds claim a history of 4,000 years. There are an estimated 12 million of them living in an area encompassing the borders of five countries: Iran, Iraq, the Soviet Union, Syria and Turkey An Aryan people with an Indo-European language, they are Sunni Moslems.

An independent Kurdistan had been promised by the Treaty of Sevres in 1920 between the Allied powers and Turkey. The promise was ignored by all parties.

Gen. Barzani apparently had doubts that the Iraqi proposals of 1970 would be implemented. In September 1971, nine persons deessed as holy men visited him at his headquarters in the village of Haj Omran ncar the Iranian border. One was a "human bomb." When he exploded, four other "holy men" and a Kurdish soldier were killed. Gen. Barzani escaped unharmed. His followers blamed the Iraqis for the attempt on his life.

The Iraqi concessions were to be implemented by 1974. As the deadline drew near, it appeared that they would not. The major stumbling block would not. The major stumbling block was the Kurdish claim to the rich Kirkkuk oil fields and a failure to reach agreement on the boundaries of the Kurdish sphere.

It was at this point that the shah of Iran offered to support Gen. Barzani in a renewed war against the Iraqis. The Israelis also reportedly offered covert assistance because Israel shared Iran's interest in tying down the Iraqi army and because it was concerned about its Iranian oil supplies.

According to the House Select Committee on Intelligence (the Pike Report), Gen. Barzani insisted on a U.S. guarantee of the shah's good intentions. The Untied States agreed to this, and supplied the Kurds with "untraceable" captured Soviet and Chinese arms through Iran.

Iranian army units took part in the subsequent fighting and Iraqi forces made incursions inside the Iranian border.

The Pike report maintains that the Kurds would have gained at least some measure of autonomy without further fighting. It said the United States hoped that the Kurds would wear down the Iraqis, but that there was no intention of supporting Gen. Barzani through to victory.

In exile here, Gen. Barzani occasionally spoke out in favor of Kurdish rights. Mostly, his life was quiet.

He was born in the village of Barzan in Iraqi Kurdistan into a family of religious scholars and tribal leaders. He earned the title of mullah, or religious wise man. After his years in the Soviet Union, he sometimes was called "the Red Mullah."

He got his first experence of oppression at the age of 3, when he and 25 members of his family were imprisoned by officials of the old Ottoman Empire. He was in jail for nine months on that occasion.

In 1931, he and 40 other members of the family were restricted to a small village after Gen. Barzani's brother, a tribal leader, led an unsuccessful uprising against the British. But he remained active in behalf of Kurdish independence throughout the 1930s and into the 1940s

In 1943, Gen. Barzani assembled a force to fight the Iraqis and the British. In 1945, he led his band into Iran and joined the Kurdish Mahabad Republic, which had been established with Soviet help. It was this government that gave him the rank of general.

A year later, the Soviets withdrew their support and the republic collapsed. The Iranian army hunted down most of the Kurdish insurgents. But Gen. Barzani led a band of 500 on a 52-day march through the mountains. Pursued by the British and the Turks as well as by the Iranians, they eventually arrived at the Araxes River on the Soviet frontier. They swam the stream and were treated as exiles by the Soviet government.

In the course of his 11 years in the Soviet Union, Gen. Barzani was an instructor in Soviet military schools.

Years later, he told an interviewer, who asked about his Soviet experiences, that "it is not right for a guest to speak critically of those who have fed and sheltered him." But he added, "(1) saw no humantarian value in the life there. Anyone who doubts this should read Svetlana Stalin's book."

Gen. Barzani, who once said that "in my lifetime my family has 14 times built homes and seen them destroyed," always maintained that the Kurdish movement could have succeeded with U.S. assistance, whether it was "political, humanitarian or military... open or secret'

Of his life, he said, "Looking back, I suppose most men have some regrets on what they might have done or what they should not have done or what they left unaccomplished. I am one of those men."

Much of Gen. Barzani's family now is in Iran. An aide said last night that his body would be returned there. Survivors include two sons, Masoud and Edris.