Pierre Elliott Trudeau, the long-serving prime minister of Canada who successfully defended his vision of federalism and a unified nation against the aroused forces of Quebec separatism, died yesterday in Montreal. He was 80. Mr. Trudeau suffered from Parkinson's disease and prostate cancer and, more recently, pneumonia. Throughout his career, Mr. Trudeau altered his country's traditionally staid and fusty image with atypical flamboyance. He was a dashing figure who made his countrymen and women proud that a Canadian was so highly visible on the world stage. Mr. Trudeau was prime minister for nearly 16 years, serving two spans during the years 1968 to 1984, interrupted by a nine-month hiatus during which his Liberal Party lost its majority to the Conservatives. Finally, in 1984, after a meditative walk in the snow, he chose to step down. Mr. Trudeau was propelled into power in June 1968 by an enthusiastic electoral surge that came to be known as Trudeaumania, a political equivalent of the paroxysms evoked by the Beatles. During his time in office, he determined the substance and tone of the evolving debate that came to define Canada as a modern nation. Long after he left office, Canadian politics were still being pursued within the national agenda he had shaped. Mr. Trudeau supervised the process by which Canada replaced its ties to Britain with a constitution of its own. He fostered economic and cultural nationalism that often put him and his country at odds with the leadership of Canada's neighbor. While firm in promoting a unified Canada, he was also sensitive to the needs of the mostly French-speaking Quebec. Mr. Trudeau saw to it that the role of the French language was reinforced when the entire country was made officially bilingual in 1984. Mr. Trudeau recognized Communist China long before the United States did. He led sometimes quixotic campaigns for world peace and nuclear disarmament while allying himself closely with Socialist leaders like Olof Palme of Sweden, Willy Brandt of Germany and Julius Nyerere of Tanzania. But for most Canadians, his greatest achievement was his successful struggle against the Quebec separatist movement. After bombings, bank robberies and kidnappings by terrorists, and after he was scorned as an apostate to Quebec's cause, he ultimately won the support of most Quebec voters. They sided with him in a referendum in 1980 that took the wind out of the sails of the independence movement. ''Reason before passion,'' was his personal motto, and he used it in arguing, on economic and moral grounds, that Quebec should stay within the federation. The separatist challenge was a major crisis in Canadian history, and his admirers say he saved Canada by defeating the movement. In his heyday, Pierre Trudeau ran his country with a panache that was aggressively and un-Canadianly immodest. He drove sports cars, flaunted his wit, dated celebrities like Barbra Streisand, toured the discos, married a former flower child much younger than himself and once, in an act of apparent insouciance, was photographed as he pirouetted alone in Buckingham Palace while other guests walked off to meet Queen Elizabeth. Many years later James Coutts, one of Mr. Trudeau's aides, disclosed that far from being spontaneous, the pirouette, like many other attention-getting gestures, had been planned and even rehearsed by the prime minister. As Michael Valpy, a political columnist for The Globe and Mail, noted in 1998 on the occasion of Mr. Trudeau's 79th birthday, the prime minister had become impressed early in his political career by an idea advanced by Marshall McLuhan, the philosopher of media. McLuhan believed that the public sees prominent figures as if they are wearing masks, and that it is the character of the mask that the public identifies with, not the person behind it. Mr. Valpy, who is married to Deborah Coyne, a constitutional lawyer who is also the mother of Mr. Trudeau's youngest child, a daughter, maintained that the mask Mr. Trudeau selected was that of the warrior chief. He added: ''It would require a Joseph Campbell to explain to Canadians -- the beaver people of peace, order and good government -- why they found magic in a warrior chief's mask. But magic they found, served up by a practiced and consummate magician.'' Another Canadian commentator, Richard Gwyn, maintained that Canadians were fascinated with Mr. Trudeau precisely because his image was not the way they saw themselves but the way they wanted to be seen. ''He teases, taunts, inspires and bugs the hell out of Canadians because they know he is utterly un-Canadian -- but exactly what they want other people to think Canadians are like,'' Mr. Gwyn wrote in a collection of essays called ''Trudeau's Shadow.'' In a country so devoted to understatement, Mr. Trudeau's ascendancy marked a radical departure. His success was compared to the transformation of style and leadership that took place eight years earlier in Washington when John F. Kennedy was elected president. Predictably, such a change drew complaints at home and abroad. In the United States, Mr. Trudeau's assertion of Canadian prerogatives frequently raised eyebrows and indignation. There was the time, for example, when he referred to a Washington bureaucrat as ''a pipsqueak.'' There were protests in America when he tried to limit American investments in Canada, particularly in the oil industry. And when he urged NATO to make a dovish retreat from its first-strike nuclear strategy, the Reagan administration thought him to be naive, dangerous and presumptuous. Still, like all Canadian leaders, he remained preoccupied by his country's relationship with the United States and even charmed critics with comments like those he offered in 1969 after meeting President Richard M. Nixon in Washington: ''Living next to you is in some ways like sleeping with an elephant. No matter how friendly and even-tempered is the beast, if I can call it that, one is affected by every twitch and grunt.'' And when Mr. Trudeau retired 15 years later, James Reston wrote in his column in The New York Times: ''Some of us down here think he was a good neighbor and a good friend. We liked his crusty arrogance and the rose in his lapel. He gave us his truth as he saw it, even if we didn't always like it.'' Joseph Philippe Pierre Ives Elliott Trudeau was born on Oct. 18, 1919, in Montreal. His father, Charles-Emile Trudeau, the son of French-speaking Quebec farmers, was a lawyer then on his way to wealth as the owner of a chain of gas stations. He also acquired profitable mines, the Belmont amusement park in Montreal and the Royals, the city's minor-league baseball team. His mother, Grace, was of mixed Scottish and French descent. The family spoke mostly French at home, but Mr. Trudeau could not remember a time when he did not also speak English. At a Jesuit high school where he studied Latin and Greek, he systematically tested teachers in contrarian debate. ''I realized that I must never interrupt a teacher to make an impertinent remark, because that would be certain to infuriate him,'' Mr. Trudeau wrote in 1993 in a book he called simply ''Memoirs.'' ''But if I waited until he paused and then I slipped in a wisecrack, the class would burst out laughing before he had a chance to get angry.'' He said the pleasure of such moments led him to a lifelong habit of ''opposing conventional wisdoms and challenging prevailing opinions.'' In 1940 he entered the University of Montreal, only vaguely aware that the war in Europe ''might constitute the most dramatic adventure the men of my generation would ever confront.'' But as he also observed, ''If you were a French-Canadian in Montreal in the early 1940's, you did not automatically believe that this was a just war. We still knew nothing of the Holocaust, and we tended to think of this war as a settling of scores among the superpowers.'' In any case, he did not enlist; he even rallied against conscription of French-Canadians. In 1943 he graduated with a degree in law, and after clerking in a law office he went to Harvard for graduate study in political economy. At Harvard, he recalled, he was made to understand the parochialism of Quebec, meeting professors, refugees from Europe, who did make him aware of ''missing one of the major events of the century.'' Until he was 30, he spent his time in study and travel. He left Harvard for Ecole des Sciences Politiques in Paris, where he roared across the city on a motorcycle and tasted from a rich and fashionable intellectual menu: the Christian left, the worker-priest movement, orthodox Marxism, classical liberalism, existentialism and particularly personalism, an attempt associated with the writer Jacques Maritain to reconcile the needs of individuals and society. A year later he was studying at the London School of Economics, principally with Harold Laski, the eminent professor of political science who was also the chairman of the British Labor Party. Mr. Trudeau has written that his basic philosophy of government was established there, at a time when Britain was on the verge of instituting the welfare state. In the spring of 1948, Mr. Trudeau set off on a slow voyage of discovery, ostensibly to do research for a doctoral dissertation, never completed, on the interplay of Christianity and Marxism in Asia. Actually, as he later explained, he was embarking on a different odyssey, eager to mix with local people and to see and sense the world. He was arrested in Arab Jerusalem on suspicion of being an Israeli spy. He was detained when he crossed the new and tense border between Pakistan and India. He hitchhiked across an Indochina already rent by warring factions. He was in China during the 1949 revolution there. His presence at a lawyers' meeting in Moscow led to instructions to American immigration officials in the anti-Communist 1950's to deny him admission if he tried to enter the United States. After two years, Mr. Trudeau returned home dismayed that the authoritarian government of Maurice Duplessis and the local ecclesiatical establishment that had ruled Quebec since his childhood were still in firm control. He committed himself to work for a ''democratic revolution'' in the province, seeking separation of church and state, electoral reform and educational changes. He founded an intellectual quarterly, Cite Libre, and used its pages to call for a coalition of democratic forces against the Duplessis regime. In 1961 he became a law professor at the University of Montreal, which earlier had steadfastly shunned him for being too radical and anticlerical. By this time a quiet revolution was well under way in Quebec, with urban, cosmopolitan and secular values rising to challenge the old culture and the old politics. In 1965 Mr. Trudeau joined the Liberal Party and won election to the House of Commons. In Parliament, he sympathized with many grievances of the French-Canadians, advocating support for their language and culture. But at the same time he steadfastly opposed any legislative action that would give them special status. He was a federalist, and he despaired of any separatist solutions that suggested ghettos. ''French-Canadians must refuse to be enclosed within Quebec,'' he wrote in one of his essays. ''The die is cast in Canada: there are two main ethnic and linguistic groups; each is too strong and too deeply rooted in the past, too firmly bound to a mother culture to engulf the other. But if the two will collaborate at the hub of a truly pluralistic state, Canada could become the envied seat of a form of federalism that belongs to tomorrow's world.'' He was quickly singled out by Prime Minister Lester Pearson, who named him to his cabinet in 1967 as minister of justice and concurrently attorney general. He produced legislation expanding social welfare, tightening gun control and liberalizing laws relating to divorce, abortion and homosexuality. When Mr. Pearson announced his intention to resign, Mr. Trudeau competed with 19 others for the post of party leader, which carried with it the prize of prime minister. Mr. Trudeau was victorious, and on April 20, 1968, he was sworn in as Canada's 15th prime minister and its third of French descent. Three days later he dissolved Parliament, calling for general elections. Mr. Trudeau campaigned on the promise of ''a just society,'' urging the richer provinces to pay for programs in the poorer ones. He conceded that the expanded programs he wanted would mean higher taxes, but declared, ''If you want pie in the sky, you'll have to vote for another party.'' It all went over well with the voters, and on June 25, propelled by ''Trudeaumania,'' the electorate gave the Liberals a comfortable majority. But the euphoria was shattered in 1970 when a terrorist group, the Front de la Liberation de Quebec kidnapped James Cross, a British diplomat, and a week later seized Pierre Laporte, a minister in the Quebec provincial cabinet. As a condition of their freedom, the Front demanded the release of members who had been imprisoned on charges or convictions of murder, bank robbery and bombings carried out in the pursuit of separatism. While demonstrators rallied in support of the Front and nonviolent supporters of separatism called stridently for full appeasement of the kidnappers, Mr. Trudeau painfully and reluctantly invoked the War Measures Act to protect Canada from a ''cancer of an armed, revolutionary movement.'' Using provisions of the act, he sent thousands of troops to Montreal and canceled some civil liberties. Some 400 people were arrested and detained without charges. Two days later, on Oct. 17, a message from the Front told authorities where they could find the body of Mr. LaPorte. Four men were eventually charged with his murder and imprisoned. Mr. Cross was then released, and his captors were allowed to leave for Cuba. Mr. Trudeau's tough responses proved highly popular, and terrorism effectively ceased in Quebec. But the issue of separatism for Quebec did not disappear. Indeed it kept growing, advanced no longer simply by terrorists but by popular politicians of the Parti Quebecois, notably Rene Levesque, an old friend of Mr. Trudeau who was to become his chief opponent on the issue. By 1976 the separatist party had taken control of the provincial government. Paradoxically, it was the success of Mr. Trudeau's policies toward Quebec that led to his brief ouster from office in the elections of May 1979. With the risk of Quebec's secession seemingly ended by his efforts, the western provinces were encouraged to lash out against Mr. Trudeau's party, which they viewed as favoring federal power at the expense of the authority of their provinces. The Liberals won no seats west of Winnipeg, and Joe Clark, the leader of the Progressive Conservative Party, became prime minister. But then Mr. Levesque inadvertantly came to Mr. Trudeau's rescue. Realizing that the elections had removed the strongest proponent of federalism from power, Mr. Levesque felt it opportune to prepare a referendum that would ask the people of Quebec whether they wanted to empower provincial officials to begin negotiations on independence. But by that act he strengthened Mr. Trudeau's support throughout the country. Some of those who had voted against him, thinking the separatist danger had ended, now openly missed his voice. And Mr. Clark quickly stumbled. He lost a vote of no confidence, and new elections were ordered. Mr. Trudeau rallied impressively, and by March 1980, he was once more prime minister. He immediately set off to challenge the Parti Quebecois in Mr. Levesque's referendum, scheduled for May. The debate became personal and nasty, with Mr. Levesque, who was seeking a yes vote, at one point dismissing the prime minister's arguments against the proposition. ''His name is Pierre Elliott Trudeau. and this is the Elliott side taking over, and that's the English side, so we French-Canadians in Quebec can't expect any sympathy from him,'' Mr. Levesque said. The prime minister counterattacked. He cited the Ryans, the Johnsons and the O'Neills -- who despite their Anglo-Saxon names were famous French-Canadian political families. Then he declared: ''Of course my name is Pierre Elliott Trudeau. Elliott was my mother's name. It was the name borne by the Elliotts who came to Canada more than 200 years ago. My name is a Quebec name. But my name is a Canadian name also. '' It worked. On May 20, 1980, 59.6 percent of the electorate voted no. In the showdown over the destiny of Quebec, Mr. Trudeau's vision had overwhelmed Mr. Levesque's hope of pulling an independent Quebec out of the federal system. Though only the foolhardy could claim that Mr. Trudeau's victory over the forces of separatism was permanent, none could dispute that it was profound. There were other successes. In 1982 he succeeded in repatriating the Constitution by having the British Parliament pass an act that ceded full responsibility for amending Canada's national charter to Ottawa. He saw bilingualism and multiculturalism become national programs. And his vision of Canada as a compassionate and benevolent government open to the rest of the world yet different from the United States has survived his term of office. There were setbacks over nuclear disarmament and over his attempts to limit foreign involvement in the economy. But it was in his private life he proved most vulnerable. In 1970, at the Club Med in Tahiti, the 51-year-old Mr. Trudeau met Margaret Sinclair, 21, the daughter of a Liberal Party politician from British Columbia. They were married the next year and by 1975 they had three sons, Justin, Alexandre and Michel. Soon after campaigning with her husband in the 1974 elections, Mrs. Trudeau suffered exhaustion and was hospitalized. When she emerged from the hospital, she became a photographer, following rock musicians and frequenting nightclubs, where she was often photographed in ways that were humiliating to her husband. Her friendship with Mick Jagger and other pop icons provided more grist for tabloid gossip columnists on several continents. The couple separated in 1974 and were divorced in 1984, with Mr. Trudeau getting custody of the children. After stepping down as prime minister, Mr. Trudeau moved to Montreal, where he kept largely to himself, avoiding interviews or public appearances. He suffered from Parkinson's disease, but even before the symptoms of his illness intensified, he kept close to home. He was always considered an aloof, insular man, and his former wife had once said that he ''destined for eternal solitude.'' His public mask, the one he had designed and shaped, seemed to have slipped away and friends who had known him for years described him as an increasingly unhappy man. In 1998 his youngest son, Michel, a 23-year-old microbiologist who worked as a ski instructor, was swept to his death in an avalanche in British Columbia. Mr. Trudeau grieved privately. He was close to his surviving sons and until his last illness frequently visited his daughter by Miss Coyne, the lawyer, whom he had first met professionally. The girl was born when Mr. Trudeau was 71. Nonetheless, despite the aloofness of his last years, memories of the warrior chief persisted in Canada. Fourteen years after he left office, when a sampling of Canadians were polled about which public figure they would most want to have dinner with, Pierre Trudeau came in a close second. The only Canadian who was more popular was the hockey star Wayne Gretzky.