WASHINGTON — Senate Democrats scored a key victory for several White House nominees Tuesday, using the threat of rule changes to force Republicans to withdraw their opposition and end a long-simmering standoff.

The deal led to the immediate approval of Richard Cordray to head the Consumer Financial Protection Bureau, the agency that was championed by Senator Elizabeth Warren of Massachusetts and is a key component of the overhaul shepherded by then-Representative Barney Frank following the financial crisis. For two years, Republicans have opposed Cordray’s nomination as a way to protest aspects of the agency.

The deal also assured a vote within days, and likely approval, for Gina McCarthy, a former official in the administration of former Massachusetts governor Mitt Romney, to head the Environmental Protection Agency.

The sides came to agreement only after a determined effort by Democrats to show that they had the votes and the will to upend decades of a Senate tradition that permits a minority of senators to block action on nominees to lead executive agencies. Democrats had threatened to use this so-called nuclear option and scale back filibuster rules after years of pent-up frustration over what they called Republican obstruction.

Get Political Happy Hour in your inbox:

Your afternoon shot of politics, sent straight from the desk of Joshua Miller.

While the deal was a win for President Obama and the Democrats, it fell short of the type of permanent change that some in the Senate have sought in the rules, which will still require 60 votes to break a filibuster.

Republicans, while giving ground on nominees for agencies overseeing environmental regulations, consumer protection, and labor rules, said they were glad to avert what they called a Democratic power grab. They warned a change in procedures would have long-term ramifications for consensus-building in the Senate, to the detriment of whichever party finds itself in the minority.

Warren expressed delight that Democrats had finally broken a logjam over Cordray, a former Ohio attorney general whose nomination was used as the main bargaining chip in a drawn-out, bitter fight over the new agency’s mission and powers.

In addition to protecting consumers from predatory practices, the agency is intended to simplify financial transactions. The Dodd-Frank legislation that established the bureau passed three years ago. Cordray was confirmed Tuesday by a 66 to 34 vote.

“We got it!” Warren said in an interview. “Now, it’s not just me saying it. It’s everyone in the Senate. There’s no doubt the consumer agency will survive beyond the crib.”

Warren, previously an adviser to Obama, helped create the bureau and ran for Senate in 2012 only because Obama declined to nominate her to lead it amid Republican threats to block her confirmation.

Though the agreement provided a rare burst of good will, its power to reduce Capitol Hill gridlock or partisan fighting appeared limited.

The pact does not prevent Republicans from blocking future nominations or legislation or Democrats from threatening rules changes.

Some Democrats, including Warren, said they will continue to push for lasting changes to Senate rules. But on Tuesday, both sides seemed relieved to the point of cheerfulness that the fight had ended short of a permanent change. Senators tend to cherish their traditions — even at the risk of treating Americans to the sort of partisan spectacle that has dragged congressional approval ratings down and distracted the Senate from action on big issues like budgets.

“We rank just below colonoscopy,” said Senator John McCain, the Arizona Republican who helped broker the pact. “The spirit of the deal is important because we know that we want to avoid this type of confrontation and near-death experience in the future,” McCain added. “This will calm things down and provide impetus for us to work together.”

McCain, one of the Senate’s longest-serving members, noted the Senate has turned over in recent years and that many members had neither tasted life when Republicans were in the majority nor lived through a similar battle in 2005, when a Republican majority went to the brink of changing the rules amid frustration with Democrats, who were blocking President George W. Bush’s judicial nominations.

Democrats accused Republicans of holding nominees hostage to make points about policy matters or pet projects unrelated to qualifications. Republicans countered that relatively few of Obama’s nominations have been rejected using the filibuster, even if they have been delayed, and that changing rules by simple majority risked a corruption of power.

McCarthy, a Massachusetts native who served as a top adviser under several governors in both parties in Massachusetts and Connecticut, saw her nomination delayed and threatened in committee after Republicans submitted more than 1,000 official questions about the EPA for her to answer, far more than for any previous nominee.

Republicans also agreed to hold votes on Fred Hochberg for a second term as president of the Export-Import Bank of the United States and on Thomas Perez to be secretary of labor. Obama has agreed to nominate two new candidates for the National Labor Relations Board, replacing nominees whose appointments during a congressional recess were ruled invalid by an appeals court. Republicans agreed to hold votes on those nominees before the August recess. A third nominee, Mark Pearce, will be considered quickly for a second term.

The agreement capped a rancorous week.

On Thursday, majority leader Harry Reid had a harsh exchange with Senator Mitch McConnell, the Republican leader. Reid accused McConnell of breaking his word. McConnell said Reid could go down as the worst leader in Senate history if he changed the rules.

It culminated Monday night with a rare three-hour meeting at which almost all 100 senators of both parties spoke about the issue behind closed doors. Several said Tuesday that the meeting’s emphasis on hearing everyone’s point of view was crucial to striking a deal and, in a sign of how combative the chamber has become, one of the rare occasions when members of the deliberative body actually communicated in a meaningful way.

“Senators actually had to listen to each other,” McConnell said.

Senators, including McCain and Democrat Chuck Schumer of New York, negotiated through the night and reached agreement by Tuesday morning.

Reid, who had opposed rule changes when the GOP ran the Senate, was so eager to resolve the issue that he cut short the swearing-in observances for Edward J. Markey, who officially replaced Secretary of State John F. Kerry on Tuesday morning, immediately after Vice President Joseph Biden administered the oath of office to the Massachusetts Democrat.

“I know a lot of people want to say some real nice things about this good man,” Reid said. “But they’re going to have to do it later. We have a lot of things to do here.”

Reid then offered a glowing speech about McCain, whom he singled out as the most important broker of the deal.

But he also hinted that this moment of Senate comity may be fleeting.

“I know feelings don’t last forever,” Reid said during a news conference later. “They’re not sacrificing their right to filibuster and we damn sure aren’t [sacrificing] our right to change the rules if necessary.”