The Senate unexpectedly stayed in session for several hours on Saturday before voting on a bill to fund the government through next September (the "CRomnibus"). The Saturday session was forced late Friday night by Senators Ted Cruz and Mike Lee, who are upset over the Obama administration's executive actions on immigration. They refused to allow Congress to go into recess without a vote on the constitutionality of Obama's actions. The Senate voted down Cruz and Lee's motion on immigration — with several Republicans joining Democrats — before it passed the CRomnibus. Because of the extra time, Senate Majority Leader Harry Reid was able to move closer to votes on 24 Obama administration nominees — including nominees for Surgeon General, the head of the country's chief immigration enforcement agency, and twelve federal judgeships — who Republican senators have been blocking.

Why is the Senate in session over the weekend?

The Senate needed to pass something by midnight Saturday night to prevent the federal government from running out of money and shutting down.

On Friday night, the Senate was supposed to pass a bill funding the government through Wednesday. Then, they would adjourn for the weekend, and come back on Monday to pass the $1.1 trillion "CRomnibus": the bill to fund most of the government through September, 2015.

This plan got worked out by Senate Majority Leader Harry Reid and Senate Minority Leader Mitch McConnell on Friday. The way the Senate works, votes need to be scheduled a certain number of hours in advance, in order to "ripen" — but under the terms of the deal, senators would agree to waive the waiting period in order to get the short-term bill passed Friday night. The problem is that waiving the waiting period requires unanimous consent of all 100 senators.

Why did Ted Cruz and Mike Lee block the plan on Friday?

Sens. Ted Cruz (R-TX) and Mike Lee (R-UT) took to the Senate floor late Friday night to call for an immediate vote to stop President Obama's recent executive actions on immigration. Under the deal that Reid and McConnell worked out, Republicans would bring up a "constitutional point of order" on Monday that would register the Senate's belief that the President's executive actions are unconstitutional. But Lee and Cruz wanted a vote on the point of order immediately.

Reid refused to give them the vote. As a result, they refused to consent to the procedural plan Reid and McConnell had worked out. No unanimous consent meant that the waiting period applied again, and the Senate had to stay in session through the weekend to allow the votes to happen as scheduled.

Congressional expert Sarah Binder of the Brookings Institution describes the result as "full bloom procedural nuttiness." But it's also, she notes, a demonstration of what happens when you can't get all 100 senators to go along with a plan: "the Senate doesn't work very well when Senators refuse to cooperate."

How did the Senate get itself out of this mess?

On Saturday night, Reid, Cruz, and others worked out an agreement to let them go home earlier.

Under that agreement, the Senate voted on the point of order Cruz wanted. It failed, 22 to 74. Then, the Senate took a final vote on the CRomnibus — which passed 56 to 40.

Were other Republicans on board with Cruz and Lee?

Many of them weren't on board with the plan to keep the Senate in session — not least Minority Leader Mitch McConnell. McConnell wanted to allow the Senate to adjourn for the weekend — in fact, according to Politico, he'd already left the Capitol on Friday when all this went down.

As a matter of fact, when the Senate voted on Cruz and Lee's motion on Saturday, 20 Republicans joined Democrats in voting against it — not because they support President Obama's actions on immigration, but to show their disapproval of Cruz and Lee's tactics. That included not only McConnell, but Cruz's fellow Texas Senator John Cornyn and Lee's fellow Utah Senator Orrin Hatch.

What does this have to do with nominees?

Republicans have been blocking lots of Obama nominees for the executive branch and federal judgeships. Reid and Senate Democrats wanted to get a chance to approve a couple dozen nominations before leaving for the year, and coming back to a Republican-controlled Senate.

When the Senate stayed in session on Saturday, Reid had a chance to go into executive session — which is what the Senate does to confirm nominees — and file for cloture on 24 nominations. That will give those nominations time to ripen sooner.

If the Senate had been out of session over the weekend, and then come back Monday to pass the CRomnibus, Reid would have had to schedule votes on nominees for later next week.

Cruz's office says that this means the weekend session didn't change anything. "Everyone knows Harry Reid planned to jam forward as many nominees as he could after the omnibus passed," said Cruz's deputy press secretary. "He made this clear to members last week, and his spokesperson confirmed so publicly."

However, according to Politico, Republican leadership was betting that lame-duck Democrats wouldn't want to stick around for all those votes. So they thought that they might be able to take control of the Senate before those nominations got approved.

But now, Reid can schedule votes that will have the time to ripen by the beginning of the week. At this rate, they'll be able to start voting for cloture on the nominees on Monday.

Who are the nominees in question?

It's a mix of judicial appointments and executive picks.

The highest-profile nomination is Surgeon General nominee Vivek Murthy, who is opposed by the NRA because he's called gun violence a public health issue. There's also a nominee to lead Immigration and Customs Enforcement — the government's chief immigration agency — who Republicans oppose because of their opposition to President Obama's recent executive actions on immigration.

UPDATE: This article was updated with a comment from the office of Senator Cruz, about the effect of the weekend session on nominations.