Margaret Trudeau, the former first lady of Canada, embraces her son Prime Minister-designate Justin Trudeau as he arrives to give his victory speech in Montreal on Monday night. (Jim Young/Reuters)

Imagine if Jackie Kennedy hung out with hippies. Imagine if Mia Farrow had married a much-older Ronald Reagan instead of a much-older Frank Sinatra. Imagine if Princess Diana had survived to find a quiet life and a happily ever after.

Then you might come close to understanding the phenomenon of Margaret Trudeau, the former first lady of Canada and one of the most sensational personalities of the 1970s.

When 43-year-old Justin Trudeau was designated the prime minister of Canada this week, it awakened memories of his late father, Pierre, a dashing law professor who became the country’s most towering politician. But with his eclectic résumé (bouncer, snowboard instructor, actor), strategic flamboyance (he has posed shirtless and boxed a political opponent for charity) and doe-eyed magnetism, Justin is clearly Margaret’s son, too.

She seemed thrilled to be by his side on his victorious election night, even though it meant a return to a spotlight that once tormented her.

“It’s not my turn. It’s their turn, and that’s the wonder and the joy of life is I had my turn,” the 67-year-old told CBC Radio on Tuesday. “It was a rocky, wonderful road I was on.”

The Trudeaus with Jimmy and Rosalynn Carter at the White House during an official state visit in February 1977. (AP)

“Maggie.” That’s what the media called her, even before the prime minister’s beautiful young wife was suddenly partying with the other one-name stars of the Studio 54 era — Andy, Liz, Misha — and the guys from the Rolling Stones.

She was 18, a college student and daughter of a cabinet minister, when she met Pierre Trudeau on vacation with her parents in Tahiti. He was 29 years her senior, the swinging bachelor of Canadian politics who had dated Barbra Streisand. She made her first public appearance on his arm in a lacy minidress.

“It was as if a vulnerable, young Elizabeth Taylor, nervous and smiling, was gracing a suburban Ottawa party,” Sondra Gotlieb, the wife of a former Canadian ambassador to the United States, wrote years later. “Her sensuality radiated throughout the room.”

They wed in 1971, in a dress she made herself. She was 22 and quickly found herself chafing at her new confines — public appearances, heavy security, a staff of house servants. “I was completely unprepared for it,” she told People magazine a few years later. “It was a total catastrophe in terms of my own identity.”

But for the world media, she was irresistible — the most fascinating Canadian in eons. At an official banquet in Caracas, Margaret stunned guests by jumping up to sing a song in honor of the Venezuelan first lady. (Half the room teared up, while the other half cringed.) She shocked Washington by wearing a knee-length dress to a White House state dinner, a choice that was debated by fashion experts for days. At an official reception in Mexico, she crashed the podium to give an impassioned speech about women’s rights; she wore jeans to a dedication ceremony in Havana. She had a nervous breakdown before turning 26, and talked openly about it in TV interviews.

Margaret Trudeau with Prince Charles at an official dinner in Ottawa in April 1975. (AP)

And then, seemingly, she bolted. She spent her sixth wedding anniversary hanging out with the Stones, at a time when Keith Richards was facing heroin charges. She jetted off to New York City to visit with photographer ­Richard Avedon and Princess ­Yasmin Khan, and spent several ­paparazzi-chased days being asked by serious journalists whether she was sleeping with Mick Jagger. (They both denied it vigorously; years later, guitarist Ron Wood revealed in his memoirs that he was actually the lucky guy.) She cursed the journalists who followed her but continued to give them outrageous quotes — that Pierre had the body of a 25-year-old, that she wore garter belts for him. She declared that she was committed to her marriage but giving up the duties of first lady to pursue a photography career.

Pierre and Margaret Trudeau with their sons Justin, center, Sacha, left and Michael, right, in May 1977. (AP)

Maggie Trudeau dancing at New York’s Studio 54 in January 1978, at a time when the estranged wife of the Canadian prime minister was a regular in the international gossip columns. (Richard Drew/AP)

Finally, the Trudeaus announced their separation in May 1977. He got custody of their three young sons. She was a former first lady at 28, but the whirlwind life didn’t stop. Instead of photography, she pursued acting, starring in two films, both flops. (“She looks pretty, especially at a distance,” wrote the Globe and Mail. “But sooner or later she has to speak to someone, to act, and then all illusion comes crashing.”) She danced into the night at Studio 54 and Regine’s. Her tonsillectomy made news, and so did her champagne-drenched exit from a London nightclub. She launched a short-lived TV talk show.

She hooked up with the volatile Ryan O’Neal, with a jet-setting Perrier executive, with a handsome young Warhol acolyte and with a half-interested Jack Nicholson — a fling that left her feeling humiliated.

Meanwhile, she continued to give interviews about how she still loved Pierre and wanted to reconcile. But in 1979, on the night when his party lost its majority, she was photographed on the Studio 54 dance floor. They remained friends, though, even as he became prime minister again and he helped out with her mortgage. But they did not reconcile.

In 1984, they divorced, just after he left the prime minister’s office for the last time. And suddenly, for the first time, Margaret Trudeau found some quiet. She got remarried that year, to an Ottawa businessman, Fried Kemper. He was her age, 35, and she had two more children with him. The Canadian media never lost their fascination with her, and she was gamely coaxed into deliciously oversharing interviews now and again.

Margaret Trudeau leaves NBC’s studios in New York after a “Today” interview promoting her 1979 memoir. (AP)

“I miss being exposed to the leading thinkers of the world,” she told Vanity Fair in 1988. “But you have to know when to exit.”

“If they would just legalize marijuana and capsulize it,” she told the Globe and Mail in 1997, on the occasion of her menopause, “I’d take it every day instead of a drink.”

There were unhappy returns to the public eye. In 1998, Michel, her youngest son with Trudeau, was killed in an avalanche while skiing. The grief overwhelmed and eventually sunk her marriage. (“Maggie and second husband divorcing” read the headline.)

She had vowed in the late 1990s to withdraw from the spotlight thereafter. It didn’t take, of course. Even before Justin, her eldest son, began his rise in politics, Margaret found a new purpose — as a mental health advocate, opening up about the bipolar illness that, it turned out, fueled so much of the wild-child antics that once titillated the international media.

“I have worked hard to become happy. It was a real struggle,” she told the Globe and Mail in 2009. “I smile at the memories, wince and wink for the bad ones, and know that I have lived.”