TUNIS, Tunisia (AP) _ Former President Habib Bourguiba, who fought for Tunisian independence and bucked Muslim traditions during three decades as the benign and forward-looking dictator of Tunisia, died today. He was 96.

Bourguiba, who had borne the titles ``president for life'' and ``supreme combatant'' before being deposed in a 1987 bloodless palace coup, died in his hometown of Monastir, a port city 110 miles south of Tunis. His frail and solitary final years there belied the life of a respected world elder-statesman who modernized his nation while still retaining the respect of much of the Arab world.

There was no immediate information on the exact cause of Bourguiba's death. He had been hospitalized March 5 in critical condition at the military hospital in Tunis, where he underwent surgery to drain air from his lungs. On March 13, he returned to Monastir where, years ago, he built himself an imposing marble mausoleum.

The presidential palace said Bourguiba's body was to be brought to Tunis today to prepare for a Saturday funeral cortege from the capital to Monastir, his final resting place. A seven-day period of national mourning was decreed.

For more than 30 years, Bourguiba overshadowed the political life of his nation. But since November 1987, after being toppled by then-Prime Minister Zine el-Abidine Ben Ali, he had lived in the shadows in Monastir, an all but forgotten man.

Despite the solitude of his final years, Tunisia has stayed the course Bourguiba set after this small North African nation gained independence from France in 1956. Moderation, modernization and pro-Western paths remain hallmarks of Tunisia, ruled then, as now, with an iron fist.

Bourguiba was born in Monastir on Aug. 3, 1903, the son of an officer in the symbolic army the French allowed the Bey, Tunisia's hereditary but powerless ruler.

As a flamboyant provincial lawyer, Bourguiba founded a nationalist movement in the 1930s dedicated to ending colonial rule. He spent more than 11 years in French prisons on sedition charges before finally achieving his objective _ total independence _ in 1956.

One of Bourguiba's first acts was to abolish the French-backed monarchy that had employed his father, replacing it with a republic with himself as president. He allowed the Algerian nationalists to set up sanctuaries in Tunisia for their own struggle against France.

In 1961, he took personal command of thousands of Tunisian civilians who attacked the naval base of Bizerte, the last French military stronghold on Tunisian soil. The French ultimately had to abandon the base _ and Bourguiba earned the title ``Supreme Combatant.''

Despite his anti-colonialist record and his authoritarian rule, he was one of the most consistently pro-Western leaders in Africa and the Arab world and deliberately turned Tunisia into the most Westernized Muslim nation. He fought against what he regarded as outdated Islamic traditions and infuriated fundamentalists by granting equal rights to women and discouraging the monthlong holy fast of Ramadan.

``A modern nation cannot afford to stop for a month every year,'' he once said, drinking orange juice on television during Ramadan.

In 1971, he was the first Arab leader to publicly advocate mutual recognition with Israel. Standing firm despite widespread abuse from Arab militants, he lived to see his idea become official Arab League policy more than a decade later.

But he joined the rest of the Arab world in condemning Egypt's Camp David peace agreements with Israel as one-sided. As a reward to Bourguiba, the Arab League chose Tunis as its headquarters when it had to leave Cairo after expelling Egypt from membership. The Arab League has since relocated to Cairo.

In his last several years as president, Bourguiba fell under the domination of an ambitious entourage headed by his niece, Saida Sassi. Some said Mrs. Sassi reigned supreme over Bourguiba and over Tunisia, despite her lack of political experience.

On Nov. 7, 1987, Ben Ali, who had been appointed prime minister, removed Bourguiba from office for ``incompetence,'' saying he had become too senile and sick to rule this Muslim nation of 7.5 million.

The trappings of a personality cult that Bourguiba cultivated were slowly dismantled around the country. Statues of Bourguiba discreetly came down, including the colossal equestrian sculpture that stood at the top of Tunis' main thoroughfare _ Avenue Habib Bourguiba.