Virginia first lady Dorothy McAuliffe stands for a portrait in the Patrick Henry building near the Capitol. She is the first Virginia first lady to have an office in the building. (Julia Rendleman for the Washington Post/For The Washington Post)

Stepping into the role of first lady four years ago, Dorothy McAuliffe knew not to mess with certain traditions that come with living in Virginia's 200-year-old Executive Mansion.

"At the dining room table, they always put the governor in the southernmost seat," McAuliffe said, recalling instructions she got right from the get-go from head butler Martin "Tutti" Townes.

But outside of the mansion, she's been a trailblazer.

McAuliffe, 54, was the first Virginia first lady to set up her office in the Patrick Henry Building, where cabinet secretaries and agency heads work. She was the first to heavily push for legislation, buttonholing state senators and delegates with all the persistence — and none of the pay — of the professional lobbyists swarming Capitol Square.

Her priorities — childhood nutrition chief among them — largely remained in the noncontroversial, feel-good realm occupied by prior first ladies. But not exclusively. She helped rescue a gun deal on the brink of collapse. She served on a task force that tackled a backlog of untested rape kits. Earlier this year, she publicly mulled a run for Congress before ultimately taking a pass.

She did so with two of her five children still at home and while fulfilling the traditional role of first lady: headlining public events, hosting receptions and making improvements to the mansion, the oldest continuously occupied governor's residence in the nation. She brought backyard chickens to the grounds, added a ramp to improve handicapped access and had the letters of two enslaved women who once toiled there memorialized on bronze plaques.

McAuliffe leaves the role next month when her husband, Gov. Terry McAuliffe (D), wraps up his four-year term. Virginia is the only state to prohibit the governor from serving back-to-back terms.

McAuliffe's husband approached his job with the over-the-top exuberance of a man with an exclamation point in the title of his autobiography, "What a Party!" The first lady, like most of humanity, is more understated than Terry McAuliffe. She could even pass for demure. Yet she also has a grit and passion that helped her pull off accomplishments of her own.

Those include expanding nutrition programs in schools across the state, which last year served 10 million more breakfasts than in 2013. She lobbied the General Assembly for the expansion, securing $2.7 million in the budget over three years — a funding pool that allowed the state to draw down an additional $22 million a year in federal money. She also established a public-private partnership with the No Kid Hungry campaign, boosting the number of after-school meals and snacks served by 2 million a year. And she helped persuade the legislature to establish a system that would provide more funding to school districts serving children of military personnel.

"She was not aggressive about it at all, very pleasant, but also very persistent," said state Sen. Emmett W. Hanger Jr. (R-Augusta), a veteran legislator who could not recall another first lady regularly lobbying.

"She basically worked the halls up there," Hanger said. "She would schedule appointments. You know how it works; we don't always show up when we think we will. But we'd find her waiting politely like everybody else. She didn't just blow in and say, 'Hey, I'm the first lady. Here I am.' "

Retired Adm. John C. Harvey Jr., then the state's secretary of veterans affairs and homeland security, worked with McAuliffe on legislation to bring more resources to schools serving military families.

"We were having a difficult time with the language for a couple reasons with the majority," he said. "I'm sitting there in the afternoon, I thought I had a deal, and all of a sudden I don't have a deal."

He called McAuliffe, who rushed over to the committee meeting and was able to iron out the language with Republicans. As the first lady entered the hearing room, an observer whispered to the four-star admiral: "Okay, so you brought in the big guns."

During a recent interview in her office, McAuliffe said talking to lawmakers just seemed natural. "If you wanted to make impact in certain areas and you saw that legislation or budget amendments might be a way to make impact, it seemed like the natural thing to do, to go talk to people," said McAuliffe, a Georgetown University Law Center graduate who practiced banking and securities law for several years.

Other first ladies pursued substantive agendas, but in more reserved style.

Virginia "Jinks" Holton, like McAuliffe, made nutrition her focus when her husband, A. Linwood Holton (R), was governor from 1970 to 1974.

"I remember she hosted a family food dollar conference, helping families learn how to spread their food dollars further," said her daughter, Anne Holton, who also became a first lady when her husband, now-Sen. Tim Kaine (D), was governor from 2006 to 2010.

"She says she never made 'speeches,' " Anne Holton said in an email. "She would host teas and 'say a few words.' I am sure also she never entered the halls of the General Assembly building — but in those days there weren't many women there in any capacity!"

In the decades since, the role became more modernized. Roxane Gilmore was the first to work outside the mansion, keeping her job as a classics professor at Randolph-Macon College when her husband, Jim Gilmore (R), served from 1998 to 2002.

Lisa Collis, wife of now-Sen. Mark R. Warner (D), was the first to keep her maiden name. Anne Holton was the first to serve in another governor's cabinet, becoming education secretary in the McAuliffe administration. She left that post in 2016 when Kaine ran for vice president on Hillary Clinton's ticket.

Holton says McAuliffe has been a bolder first lady.

"She rolled up her sleeves and got to work," Holton said, referring to McAuliffe. ". . . I went over to the General Assembly building to meet with legislators a couple of times. Dorothy was absolutely there, as a passionate advocate for kids, on a very regular basis. And it was not pomp and circumstance."

McAuliffe's time as first lady has been almost universally well received. The lone public flap involved one of her predecessors, Gilmore, who had overseen a major renovation of the mansion. Gilmore went public with concerns that the wheelchair ramp would detract from the historic structure.

Behind the scenes, it was not always an easy go for McAuliffe. She was working with a Republican-led legislature that was often at odds — if not at war — with her husband.

"Our side would be annoyed at the governor — that's just normal stuff — and she'd be victimized by that — 'Oh, we don't want to do any favors for the McAuliffes kind of deal," said Hanger, who was generally supportive of her initiatives.

McAuliffe had to overcome obstacles facing her signature issue, even if improving childhood nutrition might sound like a bipartisan no-brainer. There was initial resistance to her plan to provide breakfast "after the bell." The idea was to allow schoolchildren, who often arrive at school too late to sit down to a free breakfast in the cafeteria, to pick up a to-go meal to eat in the classroom. Legislators, teachers and custodians worried the practice would be disruptive and messy, said Steven Staples, state superintendent of public instruction.

McAuliffe traveled the state to get buy-in with principals, cafeteria workers and teachers, said Staples, who calls the program a huge success.

McAuliffe argued that with some extra state spending, the state could tap federal funds for school nutrition. That was not an easy sell in Richmond, where Republicans have refused the governor's annual request to expand Medicaid under the Affordable Care Act because they fear that federal funds would dry up and leave the state on the hook for the full $2 billion-a-year cost.

Del. R. Steven Landes (R-Augusta), chairman of the House Education Committee, worried local school districts could not afford expanded meals programs if the federal dollars disappeared. McAuliffe worked with him to ensure school districts "can disengage in an easy way" if need be, he said.

McAuliffe also played a behind-the-scenes role in January 2016 to salvage a gun deal between the governor and Republicans.

Under the compromise, the state could take guns away from domestic abusers. And state police would be posted at all gun shows to provide background checks for private sellers who choose to vet buyers. But it also called for Virginia to recognize most out-of-state concealed-handgun permits — making the deal highly controversial with some gun-control advocates.

At the last minute, the bill nearly fell apart after Del. C. Todd Gilbert (R-Shenandoah) boasted on a radio show that the pro-gun advocates had gotten the better end of the deal.

The governor was furious because negotiators had agreed to portray the deal as a win for all sides. He told Republicans the deal was off, then hopped into a helicopter to travel on state business, putting him out of touch by cellphone for a while.

Back in Richmond, the governor's top aides huddled to see if it could be salvaged. Perhaps they could leverage Gilbert's misstep to demand more concession from the gun-rights side. The first lady, though not part of the initial negotiations, joined in because the deal had been so important to the governor, who had run for office touting his "F" rating from the National Rifle Association.

"They'd broken their end of the deal, and we sensed an opportunity," McAuliffe said.

Amid the hubbub in the office, she read through the bill. She stopped when she got to the part that would make it a misdemeanor for anyone subject to a two-year protective order to possess a gun.

"She went, 'Why is this a misdemeanor?' " Moran said. "And we said, 'Let's make it a felony. Maybe we can do that.' "

Republicans agreed to that after the governor made a concession of his own: requiring the attorney general to move quickly to enter into concealed-carry reciprocity agreements with other states.

"She played a significant role in getting that across the finish line," Moran said.

As she exits, McAuliffe's only plans so far are to serve as a fellow at Georgetown's Institute of Politics and Public Service for the spring semester. She is expected to hit the campaign trail if her husband decides to run for president in 2020, but she declined to discuss that possibility.

The incoming first lady, Pam Northam, plans to follow McAuliffe's lead by setting up her office in the Patrick Henry Building, although she is not sure whether she will lobby for legislation. A former elementary and high school science teacher, Northam plans to focus on quality child care and early-childhood education, while also carrying on the traditional aspects of the role.

The incoming first lady met recently with the outgoing first lady, ostensibly to discuss some of the practical do's and don'ts of living in a historic mansion.

"We ended up talking about policy and how to move the needle," Northam said. "We realized two hours later we hadn't talked about the typical first lady things."