Much of the federal government officially shut down early Saturday morning because Congress couldn’t come to an agreement on funding. Funding for the government was set to expire at midnight January 19. Shutdowns usually happen in times of divided government. This is the first time it’s happened with one party controlling both Congress and the White House.

A stopgap spending measure to keep the government operating failed on the floor. The stopgap bill, which passed the House by a vote of 230 to 197, would have kept the government open for a month, provided funding for the popular Children’s Health Insurance Program for six years and delayed or suspended some taxes imposed by the Affordable Care Act.

Senate Republican leaders were well short of the 60 votes needed to proceed on the spending measure. Only 50 senators voted in favor of the bill. Five conservative state Democrats voted for the spending measure, while five Republicans voted against it. Sen. John McCain, R-Ariz, was absent from the vote.

Senate Democrats showed remarkable solidarity in the face of a clear political danger. Ten Senate Democrats are running for re-election in states that Mr. Trump won in 2016. The government shutdown comes one year to the day after President Trump took office.

Some Republicans are pointing the blame at the Democrats for the shutdown. Democrats were seeking concessions on other priorities, such as protecting young undocumented immigrants from deportation, increasing domestic spending, securing disaster aid for Puerto Rico and bolstering the government’s response to the opioid epidemic.

Democrats, in turn, have pointed out that a Republican president occupies the White House, and Republicans hold the majority in both the House of Representatives and the Senate, making them ultimately responsible for what happens with the government. Representative Nita Lowey, Democrat of New York, said, “It is outrageous that, even with unified control of government, the majority could not chart a course toward keeping the government open, the most basic responsibility of Congress.”

Senators from both parties are now scrambling for a new deal to reopen the government. House members were kept in Washington, D.C. over the weekend in hopes that legislators could reach a compromise. So far this fiscal year, congressional leaders have relied on stopgap measures to keep the government funded.

During the shutdown, agencies that have funding that is not subject to annual appropriations can use that money to stay open. More than one million active-duty military personnel will serve with no lapse but will not be paid until the shutdown ends.