WASHINGTON (AP) - The Senate voted Friday to confirm a retired corporate and government turnaround specialist to head the Internal Revenue Service, an agency recovering from scandal as it gears up to play a big role in implementing the president's health care law.

John Koskinen, 74, won a five-year term as IRS commissioner, which would last beyond President Barack Obama's stay in office. The vote was 59-36.

Koskinen's confirmation was one of several being voted on Friday as the Senate wrapped up its work for the year. The Senate also voted to confirm Alejandro Mayorkas to be deputy secretary of Homeland Security, and senators were scheduled to hold a test vote on the nomination of Janet Yellen to head the Federal Reserve.

The vote on Yellen was expected to clear the way for her to be confirmed in January, after the Senate returns from its holiday vacation.

Friday's votes ended a contentious year in the Senate in which majority Democrats changed the rules to make it easier to confirm the president's nominees. Democratic leaders said they were frustrated because Republicans had blocked many qualified candidates from final confirmation votes. Republicans complained that Democrats were trampling the rights of the minority party, ending decades of precedent.

Obama tapped Koskinen for the IRS job following revelations that agents had targeted tea party and other conservative groups for extra, sometimes burdensome scrutiny when they applied for tax-exempt status during the 2010 and 2012 elections. The Justice Department and three congressional committees have launched investigations.

The investigations, which are ongoing, have shown that IRS workers in a Cincinnati office started singling out conservative political groups in the spring of 2010, and continued to do so until 2012. IRS supervisors in Washington oversaw the targeting but there has been no evidence released so far that anyone outside the IRS knew about the targeting or directed it.

At his confirmation hearing, Koskinen said he will work to restore public trust in the agency.

"People need to have a view that the IRS is a nonpolitical, nonpartisan agency and that they will all be treated fairly no matter what their affiliation or political view," Koskinen said.

Koskinen's nomination had bipartisan support, but some Republicans wanted his confirmation delayed until the investigations were completed. Democrats said the position was too important to go unfilled, especially as the IRS takes on the health law.

"Mr. Koskinen is the type of leader we need at the IRS," said Sen. Max Baucus, D-Mont., chairman of the Finance Committee. "His experience as a turnaround artist in the public and private sector will be critical as he takes on this challenge."

Koskinen has extensive experience in the public and private sectors. He came in to 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 under President Bill Clinton.

With about 90,000 employees, the IRS processes more than 140 million individual income tax returns each year.

The IRS, which is part of the Treasury Department, will be in charge of enforcing the mandate that most individuals have health insurance, and collecting fines from people who don't. The IRS will also distribute subsidies to help people buy insurance in new state-based marketplaces known as exchanges.