WASHINGTON (AP) — The Senate was poised Thursday to approve President Barack Obama's choice to head the Labor Department after lawmakers, by the thinnest of margins, voted to remove obstacles blocking the confirmation while honoring a bipartisan pact for approving top nominations.

Senators were ready to confirm Thomas Perez as labor secretary by a likely near party-line roll call. After that, they were scheduled to debate Obama's selection of Gina McCarthy to become administrator of the Environmental Protection Agency.

McCarthy, who currently heads the EPA's air pollution office, has helped craft rules aimed at reducing pollutants from power plants and other sources. Republicans have long criticized the agency for championing overly restrictive regulations that they say kill jobs.

Last week, Louisiana Sen. David Vitter, top Republican on the Senate environment committee, said he was dropping efforts to delay McCarthy's nomination after the EPA agreed to release more information about how it makes decisions. McCarthy has also faced opposition from Sen. Roy Blunt, R-Mo., because of delays to a flood control project.

Perez, who leads the Justice Department's civil rights division, is considered too liberal by many Republicans. On Wednesday, GOP senators said they were opposing him because he has refused to obey a House subpoena demanding his personal emails related to a whistle-blower case against the city of St. Paul, Minn., that they have criticized him for dropping.

On Wednesday, the Senate voted narrowly to end a filibuster against Perez. All but six Republicans voted against Perez — the exact number of GOP senators that majority Democrats needed to muster the 60 votes required to end the delaying tactics against Perez's nomination.

That 60-40 vote was the closest senators have come to unwinding this week's deal between the two parties that has averted all-out partisan warfare in the chamber over nominations and Senate rules. That roll call seemed to signal that while GOP leaders would deliver the votes needed to honor the bipartisan agreement, numerous Republicans were rankled by the pact and unhappy with Perez.

In exchange for the GOP halting filibusters against seven of Obama's top nominees, majority Democrats dropped a threat of a rules change that would have prevented opponents from requiring a 60-vote threshold to end filibusters of top agency appointees. That ability to wage filibusters unless the hard-to-achieve 60 votes are accumulated has long been prized and utilized by minority parties.

The other five nominees involved in the deal are Richard Cordray, whom the Senate confirmed Tuesday as director of the Consumer Financial Protection Bureau; Fred Hochberg, whom the Senate approved Wednesday to continue leading the Export-Import Bank; labor lawyers Nancy Schiffer and Kent Hirozawa to join the National Labor Relations Board; and NLRB Chairman Mark Pearce, whom Obama wants to keep in the role.