By the end of her life, Ayn Rand had concluded that the philosophy she called Objectivism and her economic theories were probably ahead of their time. She may have been right: Many of her views were misunderstood. Others never were accepted.

Certainly Rand was a brilliant thinker, if not a particularly brilliant novelist, and the ideas she presented through her characters in "The Fountainhead" and "Atlas Shrugged," among other books, influenced many. Among her devotees in early years was Alan Greenspan, now chairman of the Federal Reserve.

But Showtime's "The Passion of Ayn Rand," premiering Sunday at 8, is an unsettling production.

The movie, based on the second half of a 1986 biography by Barbara Branden, portrays a small, intense woman with a hair-trigger temper who is so intolerant and judgmental that she nearly crushes the young devotee she considered her closest friend -- Branden.

Yet, to this day, Branden says she still loves Rand and always did. You may have trouble understanding why.

Helen Mirren created her portrayal of the ambitious and egotistical Rand after reading Branden's book and Rand's journals and letters and watching two interviews with Rand on "Donahue" in the late 1970s. She said she saw the 1949 movie version of "The Fountainhead."

In addition to "The Fountainhead," published in 1943, Rand also wrote "We the Living" in 1936, "Anthem" in 1938, "Atlas Shrugged" in 1957, "For the New Intellectual" in 1961, "Capitalism, the Unknown Ideal" in 1966 and a mystery play, "The Night of January 16th," in 1935.

Mirren, a British actress whose father was Russian-born, said she had not known of Rand, her books or her philosophy before she took the role.

Mirren, a blue-eyed blond, used colored contact lenses to change her eyes to Rand's deep brown, wore her hair in a short, brunette bob and smokes almost constantly throughout the film. (Rand died at home of lung cancer.)

Julie Delpy portrays Barbara Branden, Eric Stoltz plays Nathaniel Branden and Peter Fonda is Rand's husband, Frank O'Connor.

Barbara Branden, 69, gets a bit part as her own mother in a scene featuring her marriage to Nathaniel, the man Rand once called her intellectual heir. Twenty-five years younger than Rand, Nathaniel Branden became her lover after Rand insisted that both their spouses grant their permission for the affair.

But 15 years later, when Rand realized that her handsome young protege was having other affairs, she turned against him with ferocity. She had come to believe that in matters of disagreement, it was the other person who was wrong.

"Ayn Rand gave me free use of her work and her name and I defaulted," says Nathaniel Branden in the film. "My relationship with Miss Rand has been severed." In 1968, he stepped down from the Nathaniel Branden Institute (NBI), which had been established 10 years earlier to disseminate Rand's philosophy. Barbara Branden said she wrote "The Passion of Ayn Rand" largely to explain what had happened.

The biography begins in St. Petersburg, Russia, in 1905 when Alice Rosenbaum was born into the family of a Jewish pharmacist who had achieved a degree of success and comfort for his family. But the revolution that would dramatically change that cultured city, and Russia itself, was already under way.

By 1926, Alice, a recent university graduate, was able to escape Soviet Russia only through an invitation from relatives in Chicago. By the time she disembarked in New York City, carrying her typewriter and planning to become a novelist, she had renamed herself Ayn, borrowed from a Finnish writer. "Rand" would come from the typewriter maker Remington Rand, according to Branden.

Coming from a country newly gripped by Communism, she became an American citizen in 1931 and remained devoted to her adopted nation, grateful for the opportunity to reinvent herself, to be in a place that valued individual achievement and at last to be able to write and say what she thought.

"I'm a radical for capitalism," she would proclaim; in the movie, she draws a dollar sign on a cold shop window.

In her moral and economic philosophy, Rand held individualism and self-interest to be paramount. To her, religion and altruism were contrary to those values. Some critics called that selfish.

"She adored America and thought what it represented was absolutely the saving of humanity," said Mirren. "She was Russian in the huge scale of her emotional life and her life of thought.

"She was an unattractive woman with a huge sex drive, an extremely intellectual woman born into an era when it was unacceptable to be an intellectual woman. She was a huge egotist -- she wanted to be a star. And in fact, many of the things she advocated have come to pass."

"Ayn Rand's life was so dramatic," said Branden from her home in Santa Fe. "She had such a terrible struggle -- it was so hard and so lonely.

"I think she was a genius; I thought so the first night I met her. I've never known how you define genius, but I've thought when you're in the presence of a genius you know it. It's overwhelming. One of the things that held me all those years when I should have left was that incredible mind. I still agree with, in effect, the essentials of Ayn Rand's philosophy, but not with many of details."

Rand, a short, dark woman who never lost her Russian accent, went from Chicago to Hollywood, where Cecil B. DeMille gave her a job in 1927 as an extra on the set of "The King of Kings." There she met tall, blond, blue-eyed O'Connor, a young actor who she decided was her embodiment of the ideal man. They were married in 1929, a marriage that lasted until he died in 1979.

The movie begins in 1982 as admirers lined up at the door to view the body of Ayn Rand. At the head of the casket is a large dollar sign, a dollar-sign brooch is pinned to her dress and a framed pictured of her late husband has been laid on her chest.

"Somebody sent a big dollar sign," said Branden. "But she didn't wear the pin. That wasn't what she chose. She wanted to wear her wedding ring and she wanted the picture of Frank."

Although the movie pictures her there, Barbara Branden wasn't, she said.

"I wanted to be there," she said, "but Leonard Peikoff, who is her heir, sent back a notice [to me] that there would be guards at the door and they'd reject me."

Peikoff, Barbara Branden's cousin, was part of the coterie surrounding Rand and inherited her financial estate and royalties, Branden said. The cousins are estranged and have not seen each another since 1968, she said.

Barbara Weidman and Nathan Blumenthal, who had changed his name to Nathaniel Branden, were Canadian-born students at UCLA in 1950 when he, fascinated by Rand's books and eager to meet her, wrote her a letter. In the film, Rand invites them to her home for a discussion of ideas and philosophy, and her first private conversation with Barbara is about sex and Nathaniel. Rand, taking on the mantle of mentor, tells her: "I will see that no harm comes to you."

The pair, enthralled that Rand has taken them as devotees, eventually marry and move to New York. Rand persuades a reluctant O'Connor they too should move to New York, a city she loves. (She considered skyscrapers one of man's finest achievements.)

Finding an apartment in the same building as the young Brandens, Rand proposes that an affair between herself and Nathaniel will not threaten their marriages. "Lesser people could never accept it," she tells her husband and Barbara Branden in the film, "but we are not lesser people. Our rules are different. You hold no value higher than reason -- reason is what drew us together."

In fact, the sexual relationship, which was to have lasted one year but endured 15 off and on, said Branden, contributes to end the Branden marriage. It also changes all their lives and causes Barbara Branden to suffer an emotional breakdown, something Rand might profess not to have understood. (In the film, she says: "I can explain every emotion I have ever had.")

"It hurt, terribly," recalled Barbara Branden. "It was excruciatingly painful. I saw the movie at Sundance [Film Festival] on a big screen. I wasn't at all detached. I relived every minute of it. I thought, `How can I stop this from happening?' "

The film shows a man rescuing Barbara Branden from her collapse in a phone booth, where she had called Rand during a tryst with Nathaniel.

In fact, she said, "there was nobody outside [the booth] to help me."

Branden did find love again, with Robert Berole, manager of the NBI book service.

"There was a starting over," she said. "Ayn and Objectivism were my world. And then we moved to California and it was a different world and different people. I remember saying to Bob Berole that I really didn't know what my life was going to be but I very much welcomed being able to start over.

"We spent seven wonderful years together," she added. "He had his feet much closer to the ground than I did, and he really kept me sane that year. We're still very close friends. We seriously considered marriage."

But Branden never remarried, nor did she and her former husband communicate for some time, she said. "We came to have a rather civilized cordial relationship only recently. It's very nice."

Nathaniel Branden remarried but lost his wife in a drowning accident, and has married again. He is a psychotherapist in Beverly Hills.

Now, 17 years after Rand died, Barbara Branden is able to look back at the woman with admiration and respect.

"There was such grandeur about her, that larger-than-life quality about her, and often there were enormous kindnesses," she said. "What she achieved was incredible. I wish so much she could have seen what happened after her death. She's now taught in all sorts of universities; she's entering the academic world. It used to be mostly young people, now it's people of every age."

Yet, Branden also acknowledges Rand's incongruities:

"There was something very sad about Ayn. I've seen that most women writers, when they create a heroine, choose their own type for idealization. Ayn chose the exact opposite of her own type. She simply did not like what she looked like."

Nor did Rand understand many jokes. "She did not have much of a sense of humor. She was so accustomed to thinking in a straight logical line."

Rather, said Branden: "She was totally absorbed in two things: her writing and in developing her ideas. It wasn't that she was cruel -- she was oblivious. She was terribly judgmental and couldn't give herself to anything."

In the movie, Rand's reaction to a surprise dinner party her husband gave for her on the publication of "Atlas Shrugged" after 12 years, is a curt: "I don't like surprises." The long-suffering O'Connor, who gave up his own career for her, looks crushed.

"He was the dearest man in the world," said Branden. "Peter Fonda is a lot like him. I came to know [Fonda] a little bit -- he has a sensitivity that is not unlike Frank, and a gentleness."

As difficult and controversial a person as she might have been, Rand was ever a believer in romantic love. She called her husband Cubby; he called her Fluff.

As the film closes, she finishes a speech with a remark from "The Fountainhead": "Love is a command to rise to our highest potential, the best and noblest vision of ourselves. Love is a reward, the greatest we can earn, granted to us for the moral qualities we have achieved in our lives."

"I always thought it was charming," said Barbara Branden.

CAPTION: Helen Mirren and Peter Fonda as Ayn Rand and Frank O'Connor.

CAPTION: Julie Delpy and Eric Stoltz as Barbara and Nathaniel Branden.

CAPTION: Helen Mirren as Ayn Rand.