WASHINGTON — The Senate brought the unceremonious first session of the 113th Congress to a close Friday, with the two sides battling over procedural rules for confirming President Obama’s nominees.

In a series of largely party-line votes, the Senate approved the confirmations of a deputy to the Department of Homeland Security, a lower-level federal judge and a commissioner to the Internal Revenue Service (IRS), while setting up a final vote next month for the confirmation of Janet Yellen to become chairwoman of the Federal Reserve.

“Joy to the world,” Sen. Daniel Coats, R-Ind., said as he left the chamber after the last votes, summing up the frustration of many lawmakers in this year of legislative gridlock.

The day began on a somber note as the office of Senate Majority Leader Harry Reid, D-Nev., said he had been hospitalized for unspecified reasons. Reid, 74, who had a mild stroke in 2005, was released late Friday after treatment for exhaustion. In Reid’s absence, the session was run by the No. 2 Senate Democratic leader, Dick Durbin of Illinois.

With fewer than 60 laws passed in 2013 — most of which were just extensions of existing law or minor declarations — the year goes down as the least productive of any in modern recorded congressional history.

Hopes for bipartisan goodwill flowing from the budget deal that passed Congress evaporated in the last 72 hours of fighting about the nomination process. “If this is ‘Kumbaya’, I’d hate to see truly dysfunctional,” said Sen. Lindsey Graham, R-S.C.

On a 54-to-41 roll call, the Senate voted along party lines to confirm Alejandro Mayorkas as the No. 2 official at Homeland Security, after a partisan debate that raged for months. Mayorkas’ nomination raised concern among Republicans after they learned he was the subject of an ongoing inquiry by the DHS inspector general over accusations that he mismanaged the program and showed favoritism. Mayorkas rejected the accusations.

On a 59-to-36 vote, the Senate then made John Koskinen the first confirmed commissioner of the IRS in a year, after allegations that the agency targeted conservative political-advocacy groups for intensive oversight.

Koskinen, 74, won a five-year term as IRS commissioner, which would last beyond Obama’s stay in office. His experience includes helping overhaul mortgage buyer Freddie Mac after its near collapse in the financial crisis at the end of President George W. Bush’s administration. He also oversaw preparations for potential computer problems associated with the year 2000.

The Senate also confirmed Brian Davis, 68 to 26, as a federal district-court judge in Florida.

The final vote, 59 to 34, was to cut off debate on the Yellen nomination, ending any chance of a filibuster, with five Republicans voting with the Democrats. Her final confirmation vote will come Jan. 6, when the second session of the 113th Congress convenes.

The House ended its business for the year last week.

Material from The Associated Press is included in this report.