WASHINGTON — The Senate plugged two more vacancies in President Barack Obama's second-term leadership team on Thursday, confirming Thomas Perez as labor secretary and Gina McCarthy as administrator of the Environmental Protection Agency.

After months of Democratic complaints that Republicans were stalling Obama's efforts to staff his administration and the federal courts, the spurt of movement followed a bipartisan deal reached Tuesday. Republicans agreed to allow votes on seven nominations, and Democrats in return shelved efforts to change Senate rules to weaken the minority GOP's powers.

The chamber had approved two others to top jobs earlier in the week.

Even as that agreement appeared to be holding, details emerged of internal GOP discord about the deal.

At a private meeting of Republican senators on Wednesday, Minority Leader Mitch McConnell, R-Ky., said he had been working toward a longer-term agreement in which Democrats would have promised not to alter Senate rules during the current Congress, which runs through next year, according to lawmakers and aides familiar with the meeting. The officials spoke anonymously because they were not authorized to describe a confidential meeting.

This week's agreement does not bind Democrats to that lengthy commitment. It applies if Republicans allow votes on all seven nominations, but Democrats say they are free to try changing the rule if future nomination disputes emerge. Democrats say they would not have made such a long-range promise to McConnell.

After McConnell's remarks, Sen. Bob Corker, R-Tenn., who was involved in negotiating this week's pact, uttered a barnyard epithet, the sources said.

"In an unfortunate and weak moment, something happened and it's no big deal," Corker told reporters about that closed-door session.

Corker and Sen. John McCain, R-Ariz., the chief GOP architect of the deal, have said they kept McConnell fully informed of their talks with Democrats. McConnell publicly praised the agreement Tuesday after it was announced.

Some details of Wednesday's meeting were first reported by Roll Call, a Capitol Hill newspaper.

On Thursday Perez, a child of Dominican immigrants and one-time trash collector, was approved on a party-line 54-46 vote.

"Tom has lived the American dream himself and has dedicated his career to keeping it within reach for hardworking families across the country," Obama said in a statement released by the White House.

At the Labor Department, Perez will help shepherd administration priorities, including a revamping of immigration laws and boosting the minimum wage.

For the past four years, Perez has led the Justice Department's civil rights division. He has won praise from Democrats for aggressive enforcement of voting rights and other laws but drawn criticism from Republicans, who view him as a liberal ideologue.

Since earning a Harvard University law degree, his career has included stints as a Justice Department civil rights prosecutor and as an aide to the late Sen. Edward Kennedy, D-Mass. He took over Justice's civil rights division in 2009.

There, he has challenged Texas and South Carolina laws requiring voters to show photo identification and sued the office of outspoken Arizona sheriff Joe Arpaio, alleging that Latinos were racially profiled during a crackdown on immigrants living in the U.S. illegally.

Republicans say Perez has selectively enforced laws according to his political views and accused him of supporting efforts to sidestep federal immigration laws when he was a local government official in Maryland.

"Tom Perez is more than just some left-wing ideologue — he's a left-wing ideologue who appears perfectly willing to bend the rules to achieve his ends," said Senate Minority Leader Mitch McConnell, R-Ky.

McCarthy was approved 59-40, with six Republicans joining all but one Democrat, Joe Manchin of West Virginia, in supporting her. Manchin said the EPA has engaged in an "over-regulatory rampage" against the coal industry, which is a pillar of West Virginia's economy.

Minutes earlier, senators voted 69-31 to overcome GOP objections that had mired McCarthy's nomination since spring, nine votes more than the 60 required to halt filibusters.

McCarthy is taking over the EPA with Obama hoping to curb greenhouse gas emissions from new and existing power plants, ambitious goals that pose difficult political and technical challenges. At the same time, Congress is intent on cutting the EPA's and other agency budgets.

McCarthy's quarter century in the environmental policy world has included heading the EPA's air pollution office since 2009. Democrats touted her as a bipartisan advocate of the environment because she has worked in state agencies — including a time under then-Massachusetts Gov. Mitt Romney, last year's GOP presidential candidate, whom she advised on ways to reduce pollutants that worsen global warming.

"Gina is a proven leader who knows how to build bipartisan support for common-sense environmental solutions that protect the health and safety of our kids while promoting economic growth," Obama said.