Jonathan Ernst / Reuters

Updated on January 3 at 10:20 p.m. ET

This was not how Democrats expected, much less hoped, to begin their new House majority.

After the blue wave crested, ever so slowly, in November, the start of the 116th Congress on Thursday loomed as a moment of potential drama, a constitutionally mandated deadline for the party to decide whether to make a generational change in leadership. In the weeks after the election, Nancy Pelosi scrambled to put down an intraparty rebellion that threatened to turn her elevation to a second stint as speaker into a nail-biting vote and a showcase of Democratic division. She succeeded in impressive fashion, securing support vote by vote and demonstrating the formidable skills that have kept her atop the Democratic caucus for 16 years.

Once that leadership challenge fizzled, a new, more triumphant vision for the opening of Congress emerged: Pelosi would become the first person in more than 60 years to reclaim the speaker’s gavel, and then Democrats would promptly set about passing bills to deliver on their campaign promises and place their first checks on President Donald Trump’s power. Their initial volleys would include legislation to enact so-called democracy reforms to address campaign-finance loopholes, and measures to expand voting rights and limit gerrymandering. Bills to beef up protections for people with preexisting conditions in the Affordable Care Act and tackle high prescription-drug prices would follow soon after. Yes, these proposals would be dead-on-arrival in the Republican-controlled Senate, but the goal was to send an immediate message to their constituents and reset a legislative debate that had swung far to the right for the past two years.

Instead, neither of those scenarios occurred.

Pelosi won the speakership in a floor vote early Thursday afternoon, having punctured a group of about two dozen Democratic opponents by cutting one-off deals with some members and agreeing to procedural reforms to secure the support of another bloc. She nabbed 220 votes, narrowly clearing the majority she needed after 15 House Democrats either stated the names of other candidates or voted present.

Democrats inside the Capitol were jubilant as they gathered on the House floor with their families for the formal swearing-in and speaker vote. But they won’t be able to fully celebrate their first House majority in eight years, nor will they be able to swiftly act on their agenda. They’re taking over in the midst of a partial government shutdown—the first time in the 42-year history of the modern budget process that a transfer of power in Congress has taken place while major parts of the federal bureaucracy are shuttered due to a lapse in funding.

Within hours of gaveling in the new Congress, House Democrats passed two bills aimed at reopening the government, including one that’s identical to legislation the Senate unanimously approved in December to extend funding for the Department of Homeland Security through February 8. The other measure included bipartisan, full-year appropriations bills for eight other federal departments. Both cleared the House with some bipartisan support, as a handful of Republicans broke with their leadership to vote yes.

The move to pass substantive votes so quickly after members took the oath of office was unusual. “It just drives home how important the work is that we have to do here,” said Representative Katie Porter of California, “and the fact that we’re starting it tonight, that we’re canceling celebrations and parties to do the work the American people have sent us here to do.”

Neither bill included additional funding for Trump’s border wall, as he’s demanded. The bills represented an opening salvo both at Trump and at the Republicans who run the Senate, a bid to showcase Democrats’ new leverage while pressuring the GOP to end a shutdown the president had said he’d be proud to own.

Indeed, as the new Congress begins, there is no end in sight to the shutdown. Senate Majority Leader Mitch McConnell said he would ignore the bills that House Democrats advanced—as well as any legislation that does not have the explicit support of the president. McConnell acknowledged after a White House meeting on Wednesday that parts of the government could remain closed for weeks longer.

The stalemate won’t stop Democrats from moving on the rest of their agenda. Pelosi’s office announced an event for Friday to unveil the party’s democracy-reform legislation, with votes next week. Nor did it interrupt the traditional pomp and circumstance that accompanies the biannual convening of Congress, which proceeded with only glancing references to the government shutdown.

Lawmakers new and old gathered in the House chamber shortly after noon, and the portrait of the 116th Congress was a study in contrasts: The larger Democratic side of the aisle comprised the most diverse House caucus in the nation’s history—spanning race, ethnicity, gender, even styles of clothing—while the Republicans were a sea of overwhelmingly white men in dark suits. The members’ first act is always the roll-call vote for speaker, wherein each lawmaker calls out the name of their preferred candidate.

Representative Hakeem Jeffries of New York, the chairman of the Democratic caucus, brought his party to its feet with an energetic nominating speech for Pelosi. “Let me be clear: House Democrats are down with NDP—Nancy D’Alesandro Pelosi!” he shouted to laughs and cheers. Representative Liz Cheney of Wyoming, the daughter of the former vice president who was recently elevated to the fourth-ranking GOP post, nominated Representative Kevin McCarthy of California with a speech that reiterated the party’s full support for Trump’s bid to “build the wall.”

The vote for Pelosi was without much drama but not without defections. Many of the 15 members who withheld their support were freshmen who had pledged to voters that they would not back Pelosi for speaker. Four of them voted instead for Representative Cheri Bustos of Illinois, a fourth-term Democrat who will head the party’s campaign committee for the next two years. Representative Anthony Brindisi of New York voted for former Vice President Joe Biden—the speaker technically does not have to be a member of the House—while two House Democrats voted for Tammy Duckworth of Illinois, despite the fact that she serves in the Senate.

McCarthy suffered losses on the Republican side as well. Four votes went to Representative Jim Jordan of Ohio, the Freedom Caucus leader who had challenged McCarthy for the top GOP post.

In her first speech to the House, Pelosi mixed paeans to bipartisan comity with a recommitment to Democratic policy priorities. “I pledge that this Congress will be transparent, bipartisan, and unifying; that we will seek to reach across the aisle in this chamber and across the divisions in this great nation,” she said.

Pelosi never mentioned Trump by name, but the only two presidents she cited were Republicans: Ronald Reagan and George H. W. Bush. The new speaker quoted a Reagan tribute to America’s history as a nation of immigrants, and when Republican members of the House didn’t clap, she admonished them. “You won’t applaud for Ronald Reagan?” she asked, in a rare departure from her scripted remarks.

Turning to the Democratic agenda, the new speaker called for action to address income inequality and the climate crisis, to protect Dreamers and combat gun violence, and to reinvest in public education and workforce development. “Working together, we will redeem the promise of the American dream for every family, advancing progress for every community,” she said.

But the shutdown could sap much of the spotlight from the Democrats’ policy agenda, muddling their opportunity to drive the national debate, at least on their own terms, during their first weeks in power. The rancor associated with the funding impasse was also dispiriting to new lawmakers who had hoped that their arrival in Washington would mean a fresh start. “It’s obviously not ideal because there are many of us who came here to try to act in a bipartisan fashion, to try to form coalitions, to try to get things done,” said Representative Colin Allred, a freshman Democrat from Texas. “And this is a very bad start.”

It’s also a reminder that this Democratic House majority will be fundamentally different from the one Pelosi led a decade ago. This freshman class may be infused with the new energy of young, diverse progressives and a record number of women. But it will share power with a president who does not cede center stage easily.

Orchestrating this shutdown may not help Trump broaden his appeal at the midpoint of his term. But if nothing else, it will deny Pelosi, and the new House majority she leads, their full moment of triumph.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.