PARIS - Olivia de Havilland, the doe-eyed actress beloved to millions as the sainted Melanie Wilkes of “Gone With the Wind,” but also a two-time Oscar winner and an off-screen fighter who challenged and unchained Hollywood's contract system, died Sunday at her home in Paris. She was 104.

Havilland, the sister of fellow Oscar winner Joan Fontaine, died peacefully of natural causes, said New York-based publicist Lisa Goldberg.

De Havilland was among the last of the top screen performers from the studio era, and the last surviving lead from “Gone With the Wind,” an irony, she once noted, since the fragile, self-sacrificing Wilkes was the only major character to die in the film. The 1939 epic, based on Margaret Mitchell's bestselling Civil War novel and winner of 10 Academy Awards, is often ranked as Hollywood's box office champion (adjusting for inflation), although it is now widely condemned for its glorified portrait of slavery and antebellum life.

The pinnacle of producer David O. Selznick's career, the movie had a troubled off-screen story.

Three directors worked on the film, stars Vivien Leigh and Clark Gable were far more connected on screen than off and the fourth featured performer, Leslie Howard, was openly indifferent to the role of Ashley Wilkes, Melanie's husband. But de Havilland remembered the movie as “one of the happiest experiences I've ever had in my life. It was doing something I wanted to do, playing a character I loved and liked.”

During a career that spanned six decades, de Havilland also took on roles ranging from an unwed mother to a psychiatric inmate in “The Snake Pit,” a personal favourite. The dark-haired De Havilland projected both a gentle, glowing warmth and a sense of resilience and mischief that made her uncommonly appealing, leading critic James Agee to confess he was “vulnerable to Olivia de Havilland in every part of my being except the ulnar nerve.”

She was Errol Flynn's co-star in a series of dramas, Westerns and period pieces, most memorably as Maid Marian in “The Adventures of Robin Hood.” But De Havilland also was a prototype for an actress too beautiful for her own good, typecast in sweet and romantic roles while desiring greater challenges.

Her frustration finally led her to sue Warner Bros. in 1943 when the studio tried to keep her under contract after it had expired, claiming she owed six more months because she had been suspended for refusing roles. Her friend Bette Davis was among those who had failed to get out of her contract under similar conditions in the 1930s, but de Havilland prevailed, with the California Court of Appeals ruling that no studio could extend an agreement without the performer's consent.

The decision is still unofficially called the “De Havilland law.”

De Havilland went on to earn her own Academy Award in 1946 for her performance in “To Each His Own,” a melodrama about out-of-wedlock birth. A second Oscar came three years later for “The Heiress,” in which she portrayed a plain young homebody (as plain as it was possible to make de Havilland) opposite Montgomery Clift and Sir Ralph Richardson in an adaptation of Henry James' “Washington Square.”

In 2008, de Havilland received a National Medal of Arts and was awarded France's Legion of Honor two years later.

She was also famous as the sister of Fontaine, with whom she had a troubled relationship. In a 2016 interview, de Havilland referred to her late sister as a “dragon lady” and said her memories of Fontaine, who died in 2013, were “multi-faceted, varying from endearing to alienating.”

“On my part, it was always loving, but sometimes estranged and, in the later years, severed,” she said. “Dragon Lady, as I eventually decided to call her, was a brilliant, multi-talented person, but with an astigmatism in her perception of people and events, which often caused her to react in an unfair and even injurious way.”

De Havilland once observed that Melanie Wilkes' happiness was sustained by a loving, secure family, a blessing that eluded the actress even in childhood.

She was born in Tokyo on July 1, 1916, the daughter of a British patent attorney. Her parents separated when she was 3, and her mother brought her and her younger sister Joan to Saratoga, California. De Havilland's own two marriages, to Marcus Goodrich and Pierre Galante, ended in divorce.

She had lived in Paris since 1953. In a rare interview with The Associated Press in her luxurious Paris residence in 2016, as she celebrated her 100th birthday, she said she moved to the City of Light “at the insistence” of Galante, her late French former husband, and found no reason to return to the U.S.

She attributed her longevity to three L's: “love, laughter, and learning,” and displayed a keen sense of humour - even calling her interviewer a “rascal” for a probing question.

De Havilland's acting ambitions dated back to stage performing at Mills College in Oakland, California. While preparing for a school production of “A Midsummer Night's Dream,” she went to Hollywood to see Max Reinhardt's rehearsals of the same comedy. She was asked to read for Hermia's understudy, stayed with the production through her summer vacation and was given the role in the fall.

Warner Bros. wanted stage actors for their lavish 1935 production and chose de Havilland to co-star with Mickey Rooney, who played Puck.

“I wanted to be a stage actress,” she recalled. “Life sort of made the decision for me.”

She signed a five-year contract with the studio and went on to make “Captain Blood,” “Dodge City” and other films with Flynn, a hopeless womanizer even by Hollywood standards.

“Oh, Errol had such magnetism! There was nobody who did what he did better than he did,” said de Havilland, whose bond with the dashing actor remained, she would insist, improbably platonic. As she once explained, “We were lovers together so often on the screen that people could not accept that nothing had happened between us.”

She did date Howard Hughes and James Stewart and had an intense affair in the early '40s with director John Huston. Their relationship led to conflict with Davis, her co-star for the Huston-directed “In This Our Life”; Davis would complain that de Havilland, a supporting actress in the film, was getting more flattering time on camera.

De Havilland allegedly never got along with Fontaine, a feud magnified by the 1941 Oscar race that placed her against her sister for best actress honours. Fontaine was nominated for the Hitchcock thriller “Suspicion” while de Havilland was cited for “Hold Back the Dawn,” a drama co-written by Billy Wilder and starring de Havilland as a school teacher wooed by the unscrupulous Charles Boyer.

Asked by a gossip columnist if they ever fought, de Havilland responded, “Of course, we fight. What two sisters don't battle?”

Like a good Warner Bros. soap opera, their relationship was a juicy narrative of supposed slights and snubs, from de Havilland reportedly refusing to congratulate Fontaine for winning the Oscar to Fontaine making a cutting crack about de Havilland's poor choice of agents and husbands.

Although she once filmed as many as three pictures a year, her career slowed in middle age. She made several movies for television, including “Roots” and “Charles and Diana,” in which she portrayed the Queen Mother. She also co-starred with Davis in the macabre camp classic “Hush ... Hush, Sweet Charlotte” and was menaced by a young James Caan in the 1964 chiller “Lady in a Cage,” condemning her tormentor as “one of the many bits of offal produced by the welfare state.”

In 2009, she narrated a documentary about Alzheimer's, “I Remember Better When I Paint.”

Catherine Zeta-Jones played de Havilland in the 2017 FX miniseries about Davis and Joan Crawford, but de Havilland objected to being portrayed as a gossip and sued FX. The case was dismissed.

Despite her chronic stage fright, she did summer stock in Westport, Connecticut, and Easthampton, New York. Moviemaking, she said, produced a different kind of anxiety: “The first day of making a film I feel, `Why did I ever get mixed up in this profession? I have no talent; this time they'll find out.”'

She is survived by her daughter, Gisele Galante Chulack, her son-in-law Andrew Chulack and her niece Deborah Dozier Potter.

Goldberg, the publicist, said funeral arrangements are private and that memorial contributions should go to Paris' American Cathedral.

Italie reported from New York. AP correspondents John Leicester and Thomas Adamson in Paris and former AP Writer Dolores Barclay in New York contributed to this report.