WASHINGTON — Senate leaders reached an agreement on Tuesday to preserve the filibuster in exchange for confirmation votes on President Obama’s stalled nominees, ending, at least for now, months of partisan warfare that threatened the stability of several federal agencies and a generation of procedural traditions.

The deal, which paved the way for votes on seven nominees, was a classic Senate outcome: an inconclusive result that left both sides claiming some vindication. It was sealed with congratulations and awkward hugs among members who praised a private meeting Monday night attended by 98 senators for averting a parliamentary crisis.

The immediate result was the confirmation, in a 66 to 34 vote, of Richard Cordray as the first permanent director of the Consumer Financial Protection Board after his nomination for a five-year term had languished for months. His approval, a decisive victory for frustrated Democrats who pushed to establish the agency in the aftermath of the financial crisis, will expand the powers of the new watchdog agency, allowing it to move forward with plans to regulate a variety of consumer lending programs.

Senator Harry Reid of Nevada, who as the majority leader had forced the agreement by threatening to upend filibuster rules, said he believed the tussle had not only cleared the way for the approval of Mr. Cordray and others but had also changed the environment in the Senate for the better.