WASHINGTON — It was a moment of real drama in a chamber known for its somnambulism. Senator Mitch McConnell of Kentucky, the Republican leader, counted votes on his hand, at one point holding up three fingers as he searched for the remaining votes. Senator John Cornyn of Texas, his No. 2, paced the Senate floor.

What happened next would determine whether their party would again be blamed for triggering a crisis. But when it was clear they had no choice, the two Republicans, who face primary challenges in the November midterm elections, stepped forward in tandem on Wednesday to break their party’s filibuster.

In a nearby cloakroom, an animated Senator John McCain of Arizona pleaded with fellow Republicans to support their leaders, while others directed ire at Senator Ted Cruz of Texas, who prompted the showdown, and at one point stood alone as his colleagues gathered in a tight circle to weigh their options. Eventually, others followed the leaders — 12 Republicans in all — and the potential catastrophe was no more.