Nancy Reagan, a former film actress whose crowning role was that of vigilant guardian of President Ronald Reagan’s interests and legacy, died March 6 at her home in Los Angeles. She was 94.

The cause was congestive heart failure, her office said.

As first lady from 1981 to 1989, Mrs. Reagan had a knack for inviting controversy — from her spending habits to her request that the White House abide by an astrologer when planning the president’s schedule.

But the controversies during her years as first lady often obscured her profound influence on one of the most popular presidents in modern history. They were a universe of two, and their legendary devotion helped define the Reagan presidency.

President Obama said Sunday that Mrs. Reagan had “redefined” the role of first lady, and he praised her for becoming an advocate for Alzheimer’s disease treatments and research after her husband was diagnosed in 1994. “We remain grateful for Nancy Reagan’s life [and] thankful for her guidance,” the president and first lady Michelle Obama said in a statement.

Nancy Reagan died Sunday, March 6 in Los Angeles. She was 94. (Monica Akhtar/The Washington Post)

Mrs. Reagan was often seen as the “bad cop” to her husband’s congenial “good cop,” putting her at odds with his senior staff, who wanted more exposure for the man known as the “Great Communicator.” After John W. Hinckley Jr. attempted to assassinate her husband in 1981, Mrs. Reagan kept his senior aides and a sympathetic public at bay while he convalesced. She argued vociferously against his running for reelection in 1984, in part because of fears about his safety.

“She defined her role as being a shield for the emotional and physical well-being of the president,” said Carl Sferrazza Anthony, historian for the National First Ladies’ Library. “I believe she would see her legacy as having helped forge her husband’s legacy.”

Frederick J. Ryan Jr., who is The Washington Post’s publisher and chief executive and who is chairman of the board of the Ronald Reagan Presidential Foundation, said: “She set the standard that first ladies will aspire to for many years to come. Her contributions to the success of Ronald Reagan’s presidency may never be fully appreciated.”

Always working behind the scenes, she was involved in the hiring, and firing, of senior staff at pivotal junctures. She insisted, over the objections of some senior advisers, that her husband publicly apologize for the government’s secret arms sales to Iran, a scandal that rocked his presidency. It proved to be the right call. She also bucked the administration’s right-leaning ideologues in pushing for improved relations with the Soviet Union, conspiring with the secretary of state to do it.

Not six years out of the White House, Mrs. Reagan was tested in ways she could not have imagined. She spent a decade as primary caregiver for her husband as he succumbed to Alzheimer’s disease, with him eventually not recognizing the woman he called “Mommy.” His illness prompted Mrs. Reagan to openly challenge the George W. Bush administration and other conservatives who sought to limit research on embryonic stem cells, work that scientists think could present a cure for Alzheimer’s.

Just before his death in 2004, she made a plea for more research funding, saying, “Ronnie’s long journey has finally taken him to a distant place where I can no longer reach him.” She expressed public gratitude when President Obama lifted restrictions on federal funding of stem cell research early in his presidency, noting that “time is short, and life is precious.”

Protecting ‘Ronnie’

As first lady of California when her husband was governor, Mrs. Reagan was an outspoken advocate for returning Vietnam War veterans. She met the first planes of returning POWs landing in California, and organized dinners at the Reagan home for veterans and their families.

In Washington, Mrs. Reagan’s most prominent initiative as first lady was the “Just Say No” drug-awareness campaign, aimed at preventing recreational drug use among young people. Later, she expanded the campaign globally and held a White House summit with 30 first ladies from around the world.

Like the current White House occupants, she brought young artists to perform in the White House, many of whom were showcased in a PBS television series, “In Performance at the White House.”

But time after time, her efforts at developing a substantive role for herself were overshadowed by parallel revelations about her lifestyle or her influence over her husband.

Still, she never backed down from her primary mission of protecting her “Ronnie.”

In a stunning parting shot at her husband’s advisers in November 1988, as Reagan prepared to leave office, she told the Los Angeles Times: “I don’t feel this staff served him well in general. I’m more aware if someone is trying to end-run him and have their own agenda.”

Mrs. Reagan saw herself caught in the crosshairs of the feminist movement; she was one of the last of the stay-at-home generation who represented everything the women’s movement was rebelling against. She was ridiculed for what became known as “the gaze” — an unflinching stare at her husband when he spoke publicly.

Still, she made no apologies. “My life didn’t really begin until I met Ronnie,” she said.

During his campaigns, she vastly preferred traveling with him rather than on her own, but by the 1980 presidential race, she agreed to keep a separate schedule to reach more voters. When she saw the president perform poorly during the debates in 1984, she intervened, instructing the staff to stop feeding him endless statistics to memorize — but to let him rely on his own instincts. It proved effective.

Mrs. Reagan took Washington by storm in 1981. Even before her husband — a movie star before he became governor of California — was sworn in, she swept into town with a larger-than-life cadre of wealthy California friends and celebrities who wore sable coats, knotted traffic with their shiny white limousines and threw lavish parties the likes of which were unprecedented at inaugural festivities. At first, the public seemed to embrace what was billed as the return of style and glamour after four years of the more modest style of peanut farmer Jimmy Carter.

But the glamour soon was seen as ostentation during a steep recession. After complaining that the White House residential quarters were in disrepair, and noting that she could find no set of matching china there, Mrs. Reagan turned to affluent friends to raise funds for $800,000 in renovations and $200,000 of new china.

Although no public money was spent, these two expenditures became symbols of excess. A high-profile trip to Britain for the wedding of Prince Charles and Lady Diana six months into the presidency only fueled her detractors.

Critics took to calling her “Queen Nancy,” which eventually became a popular postcard. By December 1981, a Newsweek poll reported that 61 percent of the public considered her less sympathetic than previous first ladies to the needs of the disadvantaged.

About the same time, it came to light that she had been accepting thousands of dollars in gifts of jewelry and gowns from designers, which she declared were loans that she would return. She vowed to stop borrowing the items, and White House lawyers agreed that they would be reported annually, as ethics laws require.

But five years later, it was discovered that she had continued to borrow the clothes. She acknowledged in her 1989 memoir, “My Turn,” that it was a mistake not to make public her practice of borrowing.

“During Ronnie’s first term, I was portrayed as caring only about shopping, beautiful clothes and going to lunch with my fancy Hollywood friends. During his second term, I was portrayed as a power-hungry political manipulator,” she lamented.

In an attempt to deflect the criticism a year after arriving in Washington, she donned a bag-lady costume at the 1982 Gridiron Dinner and sang “Second Hand Clothes,” a parody of “Second Hand Rose,” before the assembled journalists and Washington power players. No one saw it coming when she slipped away from the head table and appeared onstage.

The self-deprecating performance, which surprised even her husband and brought down the house, earned her a reprieve from her critics and much positive press coverage.

Controversial adviser

Controversy followed Mrs. Reagan long before she arrived in Washington. Her longtime loyalist and White House image impresario, the late Michael K. Deaver, wrote in “Nancy: A Portrait of My Years With Nancy Reagan,” published in 2004, that the first lady had something of a tin ear when it came to grasping how things would appear in the media.

When Ronald Reagan was elected governor of California in 1966, Nancy took heat for moving her family out of the governor’s mansion — declaring it a fire hazard — and into a home in a high-end suburb.

“Being ‘right’ about the governor’s mansion, though, did not grant Nancy any reprieve from the slings and arrows of the media, then or later,” wrote Deaver, who accompanied the Reagans to Washington. “While Ronald Reagan went on to become the ‘Teflon president’ . . . by contrast Nancy would become something like the ‘flypaper first lady.’ ”

Mrs. Reagan was undeniably the president’s closest adviser and the most senior woman in the inner circle. At various times, she was intimately involved in staffing and political decisions.

“She had great antennae about who was for her husband’s agenda and who was for their own agenda,” said Kenneth Duberstein, Ronald Reagan’s last White House chief of staff and longtime confidant of the first lady.

But those who knew the couple well said that although he relied on her more than anyone else, the president had a stubborn streak and could not be pushed where he didn’t want to go. “I was around them for many years, and I never saw her push him into something he didn’t want to do,” said the late Martin Anderson, former White House domestic policy adviser for Reagan.

Former Washington Post reporter Lou Cannon, who covered Ronald Reagan as governor and president, wrote in his biography of Reagan that Mrs. Reagan was “a better listener than her husband. And she was also better than him at distinguishing between those who really cared about him or his policies and those who followed his banner to advance their own interests.”

A theatrical meeting

Born Anne Frances Robbins on July 6, 1921, in New York, she was the only child of car salesman Kenneth Seymour Robbins and Edith Luckett, an actress. Her father had left before she was born, and she rarely saw him in subsequent years.

To find work as an actress, Mrs. Reagan’s mother left her for half a dozen years to be raised in Bethesda, Md., by her aunt Virginia and uncle Audley Gailbraith. She briefly attended Sidwell Friends School in the District.

The future first lady spoke of longing for her mother in those lonely years, and in 1929, they were reunited when Edith married Loyal Davis, a prominent, wealthy, politically conservative neurosurgeon who moved them to Chicago. Mrs. Reagan adored her stepfather, who eventually adopted her, and her name was legally changed to Nancy Davis.

She described herself as an average student. She attended the Girls’ Latin School of Chicago, graduated in 1939 and went on to Smith College in Massachusetts, where she majored in English and drama, graduating in 1943. She said she always had a love for theater because of her mother’s influence, and she moved to New York to pursue acting after college.

She described her fledgling career as any young woman’s fantasy, thanks to her mother’s contacts: She had dates with film legend Clark Gable at the Stork Club, visits to Katharine Hepburn’s apartment and eventually a contract with the studio Metro-Goldwyn-Mayer.

As Nancy Davis, she had roles in 11 feature films from 1949 to 1956. Among her early roles was that of a psychiatrist in “Shadow on the Wall” (1950). Other films included “East Side, West Side” (1949) and “The Next Voice You Hear” (1950). She appeared opposite her husband only once, and that was in her last film, 1957’s “Hellcats of the Navy.”

She met Ronald Reagan when he was president of the Screen Actors Guild. Another actress by the same name had appeared on the Hollywood blacklist, and Mrs. Reagan was concerned about being confused with her. She asked a mutual friend to introduce her to Reagan to sort out the confusion. She admitted later that she had set her sights on him, pretty quickly folding her existence into his. He was an avid horseman, and she took up riding during their courtship.

On March 4, 1952, they were married in a small ceremony at the Little Brown Church near Los Angeles. Ronald Reagan’s best man was film star William Holden. Their first child, Patricia Ann — known as Patti Davis — was born seven months later. Their second child, Ron, came along in 1958.

Ronald Reagan came to the marriage with two children from when he was married to actress Jane Wyman: the late Maureen Reagan and Michael Reagan. Throughout his presidency and after, as Ronald and Nancy Reagan advocated family values, their relationship with their own children was a running drama, creating the public impression of a highly dysfunctional family.

Patti Davis’s 1992 memoir, “The Way I See It,” described a mother driven by appearances, abusive toward her and a habitual user of tranquilizers.

“As uncomfortable as it is to talk about, and write about, abuse is part of this story. I first remember my mother hitting me when I was eight. It escalated as I got older and became a weekly, sometimes daily, event. The last time it happened was when I was in my second year of college,” Davis wrote. (Mother and daughter reconciled when Ronald Reagan was struggling with Alzheimer’s, and they remained close in recent years.)

In 1984, Mrs. Reagan triggered a public feud with Michael when she acknowledged publicly that he was estranged from the family; he shot back that Ronald Reagan had yet to see his then-only grandchild, who was 19 months old. A few years later, Michael Reagan wrote his memoir, summed up by the title: “On the Outside Looking In.”

Although not as critical as Davis’s, his book told of feeling disconnected from his father, his mother (Wyman), and his father’s second family. During Reagan’s first presidential campaign in 1976, Michael Reagan wrote, he and his older sister, Maureen, “felt as though Nancy was pushing us out of the family circle and trying to bring Ron and Patti in,” despite their disinterest, because “the campaign staff . . . felt we made Dad look too old.”

He also said that he and Maureen called Mrs. Reagan “Dragon Lady” when they were younger. Later, Michael and the Reagans reconciled.

Looking to the stars

Hinckley’s assassination attempt in 1981, which gravely injured press secretary James S. Brady, was a seminal moment in the Reagan presidency, and it ratcheted up Mrs. Reagan’s already protective inclinations toward her husband. “I felt panicky every time he left the White House,” she wrote in her memoir.

Eventually, this overprotection led to her consulting an astrologer, Joan Quigley, who predicted “good” days for the president to travel or even leave the White House and “bad” days when he should stay home. Mrs. Reagan insisted that the staff follow her guidance.

Her reliance on astrology was not revealed until her bitter feud with then-Chief of Staff Donald Regan. At first, she welcomed Regan’s authoritarian management style, but she soon saw him as usurping her husband’s power for his own interests.

In 1986, the presidency was rocked by the Iran-contra affair, a rogue White House operation during which aides arranged for arms sales to Iran in return for hostages; proceeds from the sales funded anti-government revolutionaries in Nicaragua. She laid the blame at Regan’s door, because the chaos happened on his watch.

They clashed over a media and political strategy for handling the scandal, and for months their feud played out in public, with allies of both leaking unfavorable stories about the other. The daily drama prompted then-Rep. Bill Richardson (D-N.M.) to say on the House floor: “What is happening at the White House? Who is in charge? A constituent of mine asked, ‘How can the president deal with the Soviets if he cannot settle a dispute between his wife and the chief of staff?’ ”

Even her breast cancer diagnosis in 1987 proved controversial when she chose to have a modified radical mastectomy.

The decision was questioned by medical experts at the time because it ran counter to trends in breast-cancer surgery, which tended toward less-invasive lumpectomies.

The Soviet thaw

Mrs. Reagan saw early on in her husband’s term that he could have a profound impact on his legacy by working to thaw U.S.-Soviet relations, and she quietly conspired with the pragmatists in the administration to make it happen. Reagan credited his wife with “lowering the temperature of my rhetoric.”

Ronald Reagan had built his conservative credentials as a hard-liner, opposing the Soviet Union and communism. As far back as his days as head of the Screen Actors Guild, he refused to step up and help those in the entertainment industry whom then-Sen. Joseph R. McCarthy (R-Wis.) tried to expose as alleged communists.

In the White House, Reagan referred to the Soviet Union as “the evil empire,” and he surrounded himself with ideologues who had no interest in extending an olive branch to the Soviets — or engaging in a nuclear-arms reduction.

But at some point, the president saw the benefits of opening a dialogue with the Soviet Union, and his wife saw an opportunity. “Nancy believed this was her husband’s destiny,” Deaver said in Kati Marton’s “Hidden Power: Presidential Marriages That Shaped Our Recent History,” published in 2001. “A man of his age who had lived through two world wars would be the one to break the deadlock of the Cold War.”

Over the strenuous objections of national-security hawks, she worked with Secretary of State George Shultz to bring Soviet Ambassador Anatoly Dobrynin to the White House for dinner to break the ice. Despite Mrs. Reagan’s open disdain for her Soviet counterpart, Raisa Gorbachev, the first lady was credited for an attention to detail in 1987, during Mikhail Gorbachev’s state visit to the United States.

As the heads of state developed a warm relationship, the wives started their own cold war. Mrs. Reagan was said to be furious when Raisa Gorbachev said during her Washington visit, “I missed you in Reykjavik,” referring to the 1986 summit in Iceland. “I was told women weren’t invited,” Mrs. Reagan replied coolly.

During a tour of the White House, the first lady was taken aback by Raisa Gorbachev’s relentless questioning about historical and cultural minutiae, some of which Mrs. Reagan couldn’t answer.

“We were thrust together although we had very little in common and had completely different outlooks on the world,” Mrs. Reagan wrote in her book. “During about a dozen encounters in three different countries my fundamental impression of Raisa Gorbachev was that she never stopped talking, or lecturing, to be more accurate.”

After Washington

After the Reagans left the White House, they started the Nancy Reagan Foundation to support educational and drug-prevention after-school programs. After Ronald Reagan’s diagnosis of Alzheimer’s disease, the couple created and funded the Ronald and Nancy Reagan Research Institute in Chicago to study the illness.

In her final years, Mrs. Reagan lived quietly in California, lunching with old friends and spending her time advocating for stem cell research.

Survivors include her daughter, Patti Davis; her son, Ron Reagan; and her stepson, Michael Reagan.

“We’ve had an extraordinary life . . . but the other side of the coin is that it makes it harder,” she wrote of her husband’s illness in “I Love You, Ronnie,” a poignant collection of their love letters.

“There are so many memories that I can no longer share, which makes it very difficult. When it comes right down to it, you’re in it alone. Each day is different, and you get up, put one foot in front of the other, and go — and love, just love.”