Republican presidential candidate Sen. Ted Cruz’s tactics aren’t popular with his Senate Republican colleagues. (R-Texas) (Photo by Chip Somodevilla/Getty Images)

Senate Majority Leader Mitch McConnell went out of his way this week to deny Ted Cruz any opportunity to shut down the government.

As the Senate on Wednesday morning overwhelmingly passed a spending measure — including the Planned Parenthood funding that Cruz and other rabble-rousing conservatives riled against for months — Republican senators celebrated the defeat of their presidential candidate-colleague.

“I just don’t know if this is the ditch we need to die in,” said National Republican Senate Committee Chairman Roger Wicker (R-Miss.) before the Senate vote, referring to Planned Parenthood funding sparking a shutdown.

“I think most people around here are interested in getting results,” said Senate Republican Conference Chairman  John Thune (R-S.D). “They have learned sort of the hard way that there are some tactics that work and are constructive and there are some that aren’t.”

Cruz’s failure to force a shutdown is a far cry from two years ago, when the Texas Republican led a conservative revolt to defund Obamacare that closed the government for 16 days. This time, Cruz took a lead role in an ambitious, nationwide campaign where pastors urged their congregations to mobilize churchgoers against Planned Parenthood funding. But that didn’t change the dynamics inside Washington.

“Republican leadership chose to abandon its constitutional power of the purse and to fund 100 percent of President Obama’s failed agenda,” Cruz said after the Wednesday vote. “This was a mistake, and it’s why people are so frustrated with Washington.”

Cruz added that the resignation of House Speaker John Boehner (R-Ohio) gave conservatives a “real chance for new leadership in Washington,” and called on Congress to “honor the commitments we have made to the American people” rather than “replay this game again in three months.”

[Senate passes legislation to avert a shutdown]

McConnell’s (R-Ky.) success in sidelining Cruz during the shutdown fight stands in stark relief to the fate of Boehner, who chose to step down rather than risk being ousted by House conservatives spoiling for the same fight. It also illustrated the differences between now and 2013, when Cruz was fewer than nine months into the job and seeking to make a name for himself by standing up to President Obama. Now he’s a presidential candidate making a name for himself by battling his own party — as the Washington outsider fighting to tear down the system from inside. But Senate Republicans are tired of their colleague using the Senate as a campaign display.

Sen. Rand Paul (R-Ky.), who is also running for president, painted Cruz’s defeat as the end of his power in Washington.

“Ted has chosen to make this really personal and chosen to call people dishonest in leadership and call them names, which really goes against the decorum and also against the rules of the Senate, and as a consequence, he can’t get anything done legislatively,” Paul said in a Tuesday night interview with Fox News. “He is pretty much done for and stifled and it’s really because of personal relationships, or lack of personal relationships, and it is a problem.”

Despite the inside-the-Beltway loss, Cruz is likely to capitalize on the episode outside of it to illustrate the problems with the way politics are done in the nation’s capital. It could be an attractive message in a year when voters are drawn to outsiders.

[The words you need to know in the shutdown debate, defined]

On Monday, Cruz railed against leadership for just an hour before his time expired on the Senate floor. He asked for more time and was shouted down with a definitive “no” by staff on the floor. He left the Capitol with just a small gaggle of reporters who stayed past 7 p.m. to listen to his speech and was asked what allies he has left in his fight.

“The American people are frustrated by leadership that does not honor the promises that were made to them,” Cruz said.

Cruz’s presidential campaign sent out a fundraising email Tuesday celebrating the speech.

“Yesterday, Ted kept a promise he made to the American people: to fight to keep Congress from funding Planned Parenthood,” it read.

“Unfortunately he was opposed not just by Democrats, but from Leadership in the Republican Party,” read the e-mail, with the subject line “Ted Cruz exposes what’s really happening in Washington.”

The last straw for many Senate Republicans came in July when Cruz accused McConnell (R-Ky.) in a scathing speech on the Senate floor of telling “a flat out lie” about promising Democrats a vote on the expired Export-Import bank. That accusation was a bridge too far in a chamber that prides itself on being “the world’s greatest deliberative body.”

Cruz also railed against Washington in his June book, “A Time for Truth.” Cruz wrote that congressional leadership held a “show vote” on the debt limit last year, and that the “driving force” on both sides of the aisle is “risk aversion.” He insisted that government is corrupt and that telling the truth in Washington is a radical act.

[Sign up for The Daily 202, The Washington Post’s new political tipsheet]

Some Republicans argued the politics of 2013 differ from 2015, when most Republicans want to prove they can govern. McConnell and Boehner know that they risk serious backlash by bowing to a small faction of Republicans who are willing to shut down the government over issues important only to a narrow band of voters.

“I used to be called a maverick because I took on leadership on a number of occasions,” said Sen. John McCain (R-Ariz.), who has frequently clashed with Cruz. “But it was never in the context of attacking the leadership. You can disagree but it is very unusual to attack.”

McCain said Cruz is known for his relationship with House conservatives, but the Texan hasn’t done the kind of relationship building necessary to mount a revolution, let alone pass legislation in the Senate.

“It is pretty obvious that Sen. Cruz depends on a lot of House people,” McCain said. “If he has tried [to build Senate relationships]it obviously hasn’t been successful.”

Cruz’s tense relationship with his colleagues was on display this month as he unsuccessfully tried to persuade them to sign  a letter warning leadership not to consider a spending bill funding Planned Parenthood. Cruz reportedly got only a handful of signatures leading up to the shutdown vote.

A Cruz aide declined to specify how many lawmakers signed the letter, adding that a true reflection of support was the number of Republicans (20, it turned out) who opposed the government funding bill.

“While some senators may be reluctant to sign a letter directed at leadership, it is important, at the end of the day, to look at where their votes come down,” the aide said.

Even the 2013 shutdown ultimately led to a bargain with the White House that didn’t satisfy any of Cruz’s demands. And this year Republicans weren’t ready to replay the same hand, as a Democratic president who promised to veto any measure defunding Planned Parenthood is still in office.

“We’ve accomplished a lot in terms of opening up the process and putting 30 bills on the president’s desk that he signed and moving things on in a bipartisan way,” Wicker said. “Is there some sort of magic wand we can use to come up with a different outcome based on the votes we have? No there isn’t.”

But the GOP’s frustration with Cruz’s tactics only boosts his image as the rogue in Washington. Cruz rails against Washington on the trail, casting himself as an insurgent insider, someone who relishes a fight against his own party and congressional Democrats, seeing the entire city as a symbol of government dysfunction.

“If you see a candidate that Washington embraces, run and hide!” Cruz says on the trail, often to cheers, and lambastes “career politicians” as cronies who will cut deals and ignore the will of the American people.

“If you think things are going great in Washington,” Cruz often says, “if you think we need to continue heading in the same basic direction … then I ain’t your guy.”

Cruz’s Washington talk mostly involves fighting: fighting against the funding of Planned Parenthood, the Iran deal, Common Core and the Environmental Protection Agency, abolishing the IRS and vowing to repeal Obama’s “illegal and unconstitutional” executive orders.

Unlike those in Washington, he said, Cruz is a “consistent conservative, not a campaign conservative,” who says that he’s going to “do exactly what I say I will do,” which doesn’t involve joining the Senate’s clubby world. On the trail, Cruz doesn’t attack his fellow presidential candidates, and argues that he’s not assailing his Senate colleagues, but rather telling the truth about what happens in the body.

“Republican leadership starts the discussion by saying, ‘We give up.’ And it all starts with Republican leadership making this promise we will never, ever, ever have a shutdown. Look, on the face of it, that sounds reasonable,” Cruz said in a Saturday interview with Fox News.

“The problem is the other side. Barack Obama … never stops, he never gives up, and once Republican leadership says under no circumstances will we allow a shutdown, then Obama knows all he has to do to win any fight is utter the word ‘shutdown’ and Republican leadership is running for the hills.”

That’s why you need, he said, “a Republican president committed to conservative principles.”

John Wagner contributed reporting from Urbandale, Iowa