Nancy Pelosi’s bid to become speaker of the House in January, when Democrats seize control of chamber, got a huge boost Wednesday when members of her caucus voted overwhelmingly to back her.

But the 203 votes she got from fellow Democrats means that, at least for the moment, she is a few votes short of what she will ultimately need ― namely, a majority of the entire House, including members of both parties. To reach that threshold, she’ll likely need votes from at least a few Democrats who have yet to endorse her.

At the moment, the biggest pocket of opposition comes from centrist Democrats and those from more conservative districts, which is no surprise. In her more than 30 years in the House and more than 15 years as a member of Democratic leadership, Pelosi has been a bogeyman for conservatives, and centrist Democrats have kept their distance from her for years.

But Pelosi is also confronting more skepticism from the left than at any other time in her career.

The “San Francisco liberal” caricatured by the right now faces protests outside her office from progressive activists demanding stronger action on climate change. She’s catching grief from progressives appalled at her pledge to match new spending with cuts or taxes, making it much more difficult to enact expansive initiatives like free college tuition.

Other progressive gripes with Pelosi include her vow to work with Trump on their limited areas of common interest, starting with infrastructure, and her failure to embrace a single-payer Medicare for all health care program, which has become a litmus test for progressives.

Pelosi defenders frequently cite her role in the Affordable Care Act, the signature domestic accomplishment of Barack Obama’s presidency and her four-year tenure as Speaker. But to many progressives ambivalent about the law because of its shortcomings and compromises, that episode only shows that Pelosi is too close to monied interests and has been too quick to compromise with centrists.

Key players from that drama, including elected officials, staff and lobbyists, see things differently. They say Pelosi battled with Senate Democrats and the White House to make legislation more progressive ― and fought hard. They say she cut deals because it was the only way to get a bill through Congress and onto Obama’s desk.

If Nancy Pelosi had not been the House Speaker in the 111th Congress, the Affordable Care Act would never have been enacted. Ron Pollack, former executive director of Families USA

These were not decisions Pelosi took lightly or without understanding what most House Democrats wanted, said former Rep. Barney Frank (D-Mass.), who infamously declared health care reform dead in early 2010, only for Pelosi and other party leaders to prove him wrong. There simply weren’t enough votes in Congress to pass a more progressive health care bill, and Pelosi knew it, he said.

“Counting is not simply an act of figuring out where they are. It’s shorthand for talking to each member, finding out what each thinks is important,” Frank said. “And then she has a very good sense of where the point would be where you can attract most of the members.”

Frank and other veterans of the health care fight in 2009 and 2010 point out what the years since this bruising legislative battle, and a leftward shift within the Democratic Party, have obscured ― namely, that the reform effort nearly foundered on more than one occasion.

The bill was widely assumed to be hopeless after Republican Scott Brown won a special election for the Senate seat of the late Democrat Edward Kennedy in January 2010. This deprived Democrats of the filibuster-proof majority that passed the upper chamber’s more moderate version of the health care bill ― and Pelosi was as responsible as anybody for figuring out a way to pass legislation in the aftermath.

“If Nancy Pelosi had not been the House Speaker in the 111th Congress, the Affordable Care Act would never have been enacted because Pelosi, time and again, made the difference in getting the law passed,” said Ron Pollack, who, as executive director of the liberal advocacy organization Families USA at the time, was deeply involved in advancing the legislation.

Pelosi And The Public Option

The Affordable Care Act has provided health coverage to about 20 million people and decreased the national uninsured rate to the lowest level ever recorded. Few progressives question that Pelosi had a big hand in passing legislation, although many who weren’t part of the health care reform fight nearly a decade ago don’t understand just why her role was so vital.

But if progressives are happy to acknowledge Pelosi’s work on behalf of reform, they are not so happy about what that effort produced.

They wish, among other things, that the law offered more generous assistance to make health coverage affordable and included a public option ― that is, a government-run insurance program that would compete alongside private carriers offering coverage through HealthCare.gov and state-run exchanges. The public option was intended as a key compromise to progressives who preferred a more government-centric system like single-payer to the private-based Affordable Care Act.

The irony of this line of criticism is that Pelosi said repeatedly she was on the side of those who wanted a public option. The legislation the House passed in 2009, under her leadership, offered such a plan ― despite opposition from conservative Democrats and lobbyists from major industries, such as hospitals, that believed a public option would pay them less and thus hurt their revenue streams.

Liberals ultimately went along, said Henry Waxman, the retired California Democratic congressman who chaired the Energy and Commerce Committee at the time and one of the law’s chief authors, precisely because Pelosi had fought so hard for it earlier in the process. That gave her credibility when she said it was the best deal possible under the circumstances.

“She had very strong feelings about a public option. She said she wanted a public option, you know I am on your side. I will count all the votes, see where we are. She showed us in the caucus that the votes just weren’t there,” Waxman said.

ASSOCIATED PRESS Rep. Nancy Pelosi (D-Calif.) wields the gavel in 2007 as the first woman to serve as speaker of the House.

Pelosi And The Senate

The legislation didn’t simply need to pass the House, of course. It had to get through the Senate, too. And there, things were even tougher.

Democrats had 60 votes in the Senate in 2009, the minimum needed to overcome Republican filibusters of their legislation. A handful of centrist Democratic senators ― especially Ben Nelson of Nebraska, Blanche Lincoln of Arkansas and Mary Landrieu of Louisiana ― and independent Joe Lieberman of Connecticut held virtual veto power over the Senate’s entire agenda and were opposed to a public option in any form.

Then-Senate Majority Leader Harry Reid (D-Nev.) finally gave up on a public option after months of trying to accommodate centrist demands. Another reason Reid struggled was that the White House, which backed the public option but didn’t exert much effort on its behalf, had cut deals with hospitals and pharmaceutical companies that opposed the public option to gain their support for health care reform.

“The president cut her legs out when he cut the deal with pharma and he cut a deal with the hospital association,” former Rep. Bart Stupak (D-Mich.) said of Pelosi. “Those two agreements right there announced by the White House just really basically killed the public option.”

Pelosi led the House’s negotiations with the White House and Senate Democratic leaders and, by all accounts, forcefully argued for the House’s version of the bill. But she ran into the same objections, from the same centrist senators, that had stymied Reid.

Pelosi In The Final Stretch

Those negotiations hadn’t yet ended when political catastrophe struck Democrats. With Brown taking that Massachusetts Senate seat and Democrats losing their 60th vote, legislation wasn’t going to pass over solidified GOP opposition. Brown had campaigned in part on his opposition to “Obamacare.” In Washington, even some elected officials and advocates who supported the legislation, like Frank, figured that would be the end of health care reform.

“There were a lot of people, including strong progressives, who, with that election result, said the Affordable Care Act was dead,” Pollack said.

It quickly became apparent that the only way forward was for the House to approve legislation that the Senate had already passed, as written, on a promise that the Senate would then approve a series of amendments that could get through the budget reconciliation process, through which filibusters can’t stop a majority from passing bills. It was not an ideal solution, Pelosi knew, because Senate procedural rules limited the kinds of changes that could go through this type of legislation ― and liberals in her caucus, especially, would have a hard time with it.

“The Nancy Pelosi I know would stick to her guns, would stick to her principles, she would not cave,” Max Baucus, who as chairman of the Senate Finance Committee authored most of the more moderate bill that wound up law. “She was a very good, pragmatic, practical negotiator representing her House, as a good speaker would. She’s more liberal than I, but she wanted to do deals,” Baucus said.

Pelosi persisted, reminding members of her caucus that Democrats had been fighting for universal coverage for decades ― and that even a flawed bill was worth passing, especially because it would be possible to amend and improve the law later on, just like previous generations of lawmakers had done with Medicare, Medicaid and Social Security.

“She understood full well that this was the only way that we could pass the Affordable Care Act,” Pollack said.

Pelosi And Abortion

Stupak spent most of the health care reform effort locked in a battle with Pelosi and other pro-choice Democrats about abortion. As he details in his 2017 book, For All Americans (The Dramatic Story Behind the Stupak Amendment and the Historic Passage of Obamacare), Stupak had many complaints about the way Pelosi handled his demands that the Affordable Care Act include strict language prohibiting federal dollars from paying for elective abortions.

Stupak eventually lost that legislative fight but struck a deal with Obama, who signed an executive order seeking the same effect. Abortion rights activists, like former Planned Parenthood President Cecile Richards, still consider that a major progressive victory. “I credit her with not only saving a pretty important right to women but also getting the bill passed,” Richards said.

But even without his abortion language, Stupak said in an interview, the bill was a big step forward for expanding coverage and reforming the health care system ― and that Pelosi deserves praise for it.

When some congressional Democrats and a contingent of senior White House aides wanted to give up on the Affordable Care Act and move a less ambitious health care bill after Brown’s election, Pelosi stood firm, Stupak said. “She didn’t back down from the idea that we could have universal health care coverage,” he said.

Stupak battled with Pelosi at times, but has little patience for the criticism leveled at the Democratic leader over health care reform: “It’s easy to condemn a person or party or a speaker or whatever when you don’t understand it, and 99 percent of people I talk to have no idea what the hell they’re talking about when they talk about the Affordable Care Act.”

This story has been updated to reflect the results of Wednesday’s vote.