NEW DELHI, JAN. 20 -- Abdul Ghaffar Khan, 98, the last surviving major figure of the struggle that brought freedom to the Indian subcontinent, died today at a hospital in Peshawar, Pakistan, after a series of strokes.

"Badshah" (Emperor) Khan, as he was popularly known, held no major office but was, along with Mohandas K. (Mahatma) Gandhi, Jawaharlal Nehru and the founder of Pakistan, Mohammed Ali Jinnah, in the forefront of the movement to remove British rule from India.

In 1947, at the time of India's independence, Khan went along with the decision of the majority of Pathans in the North West Frontier Province to join the newly created federation of Pakistan.

Khan was born in the village of Uttamanzai in the Peshawar district of the North West Frontier Province, scion of a leading family of the Mohamadzai Pathan tribe. His father, Khan Sahib Bahram Khan, was a village headman and landowner who, though illiterate, was highly respected for his honesty and Islamic faith.

Khan received his early education at home and in a Moslem religious school. He attended a mission high school in Peshawar, but failed to graduate. He was then sent to Aligarh (now in India's Uttar Pradesh Province) where he read Urdu-language newspapers, some edited by leaders of Gandhi's Indian National Congress movement, arousing his interest in politics.

Deeply influenced by the missionary spirit of the Peshawar high school's principal, Khan resolved to serve his community and faith. When he returned from Aligarh in 1911, he associated hmself with a religious leader, the haji of Turangzai, and established several nationalist schools in Peshawar.

He began his political career in 1919, making a speech against the Rowalatt Act, legislation used by India's British rulers to suppress freedom of the press and curb freedom of expression. He was arrested for making the speech.

Between 1920 and 1947 he spent more than 14 years in prison, mostly for his activities as a member of the Congress working committee, and he was tortured several times.

A 6-foot-4, bearded man, he typified the indomitable spirit of the rugged Pathans of the North West Frontier. He campaigned against the British from the 1920s, seeking for the Pathans the same administrative reforms and representative councils that the British were instituting in other parts of India for other minorities, such as Moslems and caste groups.

To aid his struggle he founded a militant group called the Red Shirts, whose members dyed their clothes red, and formed almost a parallel government in the North West Frontier Province with aid from the Indian Congress. By 1932 the province gained the status his Red Shirts wanted.

When the subcontinent won independence and was partitioned into India and Pakistan, Khan advocated autonomy for the province. However, it was incorporated into Pakistan.

Khan continued to fight for greater autonomy for the Pathans, striving to bring together the warring tribes. He once told an interviewer, "I want to knit the tribes into one brotherhood," and for his active advocacy of the Pathan cause he was repeatedly jailed or placed under house arrest by the Pakistani government.

After 17 years of isolation and imprisonment in Pakistan, Khan went to live in Kabul, the capital of Afghanistan, in the mid-1970s. He was in Afghanistan in December 1979 when invading Soviet troops took over the communist government of Hafizullah Amin and put into power the pro-Soviet government of Babrak Karmal.

Although he expressed relief that the brutality of the Amin regime was over, Khan regretted the Soviet takeover. He told an interviewer at the time, "Who can be happy to look out of his window and every morning see a Soviet soldier standing across the street, gun in hand and ready to fire if required?"

Khan lived the last years of his life mainly in the Afghan city of Jalalabad, visiting India occasionally for medical treatment, mainly for arthritis. He married twice, but both his wives died before him. He is survived by four children. A son, Wali Khan, is a prominent leader of Pakistan's opposition Movement for Restoration of Democracy. A nephew is a close confidant of Indian Prime Minister Rajiv Gandhi, who flew to Peshawar today to pay his respects.