WASHINGTON — For Senator Mitch McConnell, the Kentucky Republican entering his sixth month in his dream job of majority leader, the congressional struggle over National Security Agency surveillance powers produced a lose-lose-lose result.

He failed to win even a brief extension of N.S.A. programs that lapsed Monday, interrupting an antiterror effort that he said he believed in strongly. Stymied on the extension front, he was then forced to put Congress on course to enact a House-passed N.S.A. overhaul that he opposes, saying he fears it will weaken national security.

Topping it off, he provided the growing ranks of Senate Republican presidential candidates with evidence that the best way to get maximum attention is to break with the leadership and inject themselves into a big Senate fight at a crucial moment — just as Senator Rand Paul did Sunday with a series of objections, causing the N.S.A. programs to expire.

“Everyone has always assumed Senator McConnell has an ace up his sleeve, but Senator Paul called his bluff,” said Senator Charles E. Schumer of New York, the No. 3 Senate Democrat. “You don’t leave yourself in that position.”