Luise Rainer, who won back-to-back Academy Awards in the mid-1930s playing a glamorous stage actress in “The Great Ziegfeld” and a Chinese peasant in “The Good Earth” before quitting her studio contract and becoming known as “the star who walked out on Hollywood,” died Dec. 30 at her home in London. She was 104 and the oldest living Oscar winner.

The cause was pneumonia, said her daughter, Francesca Knittel Bowyer.

The German-born Ms. Rainer was an accomplished dramatic actress who starred with Max Reinhardt’s theatrical troupe in Europe before her delicate beauty and lively personality won her movie parts.

She was summoned to Hollywood in 1935 and signed a contract with Metro-Goldwyn-Mayer studios, whose chief, Louis B. Mayer, was alternately her champion and her antagonist.

Mayer hoped to promote Ms. Rainer’s continental glamour as competition for actresses Marlene Dietrich and Elisabeth Bergner. Ms. Rainer continually battled efforts to cast her in romantic froth, including her Hollywood debut in “Escapade” (1935).

The next year, she lobbied for a highly dramatic but relatively small part in “The Great Ziegfeld.” As Anna Held, she played the long-suffering common-law wife of theatrical impresario Florenz Ziegfeld Jr.

The studio head, Mayer, was initially against the casting, fearing she would be overshadowed by two major stars: William Powell as Ziegfeld and Myrna Loy as the woman Ziegfeld later married, actress Billie Burke.

Ms. Rainer surprised many by winning the Oscar, mostly for a celebrated phone scene in which the emotional Held congratulates Ziegfeld on his marriage.

She later said she wrote the scene herself after a longer version was cut, taking much of the material from a similar moment in Jean Cocteau’s play “La Voix Humaine” (“The Human Voice”). To sustain the emotional core of the scene, she said she recalled a beloved cocker spaniel who was put to death the day before filming.

Her next major role was O-Lan in “The Good Earth” (1937), based on Pearl S. Buck’s Pulitzer Prize-winning novel. Again, Mayer objected, believing it would diminish her beauty to play a peasant married to a farmer (Paul Muni). Furthermore, the part was largely nonspeaking and relied on the expressiveness of her eyes.

Ms. Rainer also had some doubts about her ability to convey deep sorrow, later telling a reporter, “I thought I was going to be a hilarious bore in the film.” New York Times film critic Frank S. Nugent wrote that Ms. Rainer was “tragically real.”

She became the first to win two consecutive best actress Oscars, an accomplishment later matched by Katharine Hepburn in the late 1960s. (Spencer Tracy in the 1930s and Tom Hanks in the 1990s won consecutive awards for best actor.)

Ms. Rainer, shown here in her role in “The Good Earth,” died Dec. 30 at her home in London. She was 104. (The Washington Post Archive)

But painfully apparent was the studio’s inability to find Ms. Rainer suitable follow-up material, casting her as a taxi driver’s wife in “Big City” (1937) with Tracy and a New Orleans flirt in “The Toy Wife” (1938) with Melvyn Douglas.

Worst of all, she said, was “The Emperor’s Candlesticks” (1937), a spy tale co-starring Powell. “You know, it’s a detective story,” she later said of the film. “I got very confused. To the end, I didn’t know who did it.”

She complained to Mayer, saying, “ ‘My source is dried out.’ He looked at me and he said, ‘What do you need a source for? Don’t you have a director?’ ”

“What could I say?” she told the London Guardian. “He looked at me for a long time, and then he said, ‘You know what? We made you, and we’re going to kill you.’ And I said, ‘No, Mr. Mayer. God made me.’ And I walked out of the studio.”

She regretted little except losing the chance to act in dramatic roles. Among them was “Johnny Belinda,” based on a 1940 play about a deaf-mute rape victim.

When Ms. Rainer proposed “Johnny Belinda” to Mayer, she said he replied: “God, we’re making talkies these days. What would you want to do that for?”

Eight years later, Jane Wyman fought for the part at Warner Bros. studios and won an Oscar.

Luise Rainer was born Jan. 12, 1910, in Düsseldorf, Germany — not Vienna, as studio biographies insisted. Because of Adolf Hitler’s rise in Germany, Mayer did not want to debate her country of origin. He told her, “You are Austrian.”

Her father was a businessman and strict. When she spoke of her enthusiasm for the stage, her father likened it to prostitution.

At 16, she decided to audition for a play in Berlin under the pretense of visiting relatives in the capital.

Her break occurred months later in Düsseldorf, when she impressed German actress Louise Dumont by auditioning with one of Frank Wedekind’s sexually explicit plays.

After Dumont began casting her in leading parts, word of Ms. Rainer’s abilities filtered to Max Reinhardt. He took her to Vienna in 1928 and showcased her in Luigi Pirandello’s “Six Characters in Search of an Author” and a production of Theodore Dreiser’s “An American Tragedy.”

“He was cultivated and thoughtful,” Ms. Rainer later said of Reinhardt. “He let me alone so I was able to create a part. He didn’t interfere.”

She had roles in minor German films and was recruited to Hollywood. In California, she fell in with a circle of intellectuals that included songwriter George Gershwin, novelist Thomas Mann, and the writer and wit Dorothy Parker.

One night at the Brown Derby restaurant, Ms. Rainer was approached by leftist playwright and screenwriter Clifford Odets. They commiserated over their struggles in Hollywood and married in 1937. They divorced three years later.

She described Odets as pathologically jealous of her Oscar wins. He once hid “his competitiveness behind a mask of indifference to such vulgar honors,” she told an interviewer.

He also tried to educate her politically by thrusting Karl Marx’s “Das Kapital” at her, but her politics extended solely to relief efforts during the Spanish civil war and visiting soldiers in North Africa and Italy during World War II.

In 1945, she married Robert Knittel, who became editorial director of William Collins, a London-based publishing company, and they led a comfortable life in England and Switzerland. Until his death in 1989, they went mountain climbing to stay fit.

Survivors include their daughter, Francesca Knittel Bowyer of La Quinta, Calif.; two granddaughters; and two great-grandchildren.

Ms. Rainer was content to work sporadically. She appeared in a short-lived Broadway production of Henrik Ibsen’s “The Lady From the Sea” (1950), performed Lillian Hellman’s “The Little Foxes” in Vienna in the 1960s and traveled the United States reciting Alfred Lord Tennyson’s “Enoch Arden,” a poem with more than 900 lines, in the early 1980s.

She also took to painting and had a one-woman show in London in 1978.

She almost appeared in Federico Fellini’s “La Dolce Vita” — “I need your poetic face,” he told her — but she balked when Fellini insisted she participate in a sex scene with Marcello Mastroianni.

After decades away from the screen, Ms. Rainer emerged in “The Gambler” (1997), a film shot mostly in Budapest and starring Michael Gambon as Fyodor Dostoyevsky.

Ms. Rainer played the matriarch of a debt-ridden family, and New York Times film critic Stephen Holden praised Ms. Rainer for having “the magnetic presence of an ancient grande dame with an elfin sense of mischief.”

In a subsequent interview with that paper, the ever-feisty Ms. Rainer objected to the description, asking, “What am I, an antiquity?”