Republican presidential candidate Senator Ted Cruz holds a campaign rally as part of his 'Christmas Tour' at the Life Church in Mechanicsville, Va. (Charles Ommanney/The Washington Post)

Ted Cruz, the campaign slogan goes, is the only “consistent conservative” in the 2016 Republican presidential primary.

Except, apparently, when he isn’t.

As the Texas senator has risen in the polls, he has come under new attacks from opponents, pointing out that his positions on key issues have changed over the course of the campaign.

Asked about five of those cases, the Cruz campaign explained why what looked like shifts in his policies really weren’t shifts. Or, if one was, the change was caused by circumstances outside Cruz’s control.

1. Should the U.S. military intervene in Syria?

Cruz’s past position: “We have no dog in the fight of the Syrian civil war.” (Late November, interview with Bloomberg News).

Cruz’s current position: Bomb Syrian territory until the sand glows. “We will carpet-bomb them into oblivion,” Cruz said in Iowa this month, speaking about Islamic State militants in Syria. “I don’t know if sand can glow in the dark, but we’re going to find out.”

Which sounds like: He has a dog now. Cruz now wants the United States to attack one major player in Syria’s multisided civil war — the Islamic State — while sending arms and aid to another set of players, the Kurdish militant groups.

But: Cruz says he hasn’t changed his mind. In fact, his campaign says, his two positions are entirely consistent . . . as long as you accept that America’s fight against the Islamic State doesn’t actually involve America in the Syrian civil war.

“We can target ISIS without getting involved in the civil war,” Cruz’s spokeswoman said, using another name for the Islamic State.

In Cruz’s mind, the spokeswoman said, the United States can destroy the Islamic State without being entangled in the broader fight between the Islamic State, other militants and the government of Syrian President Bashar al-Assad. In essence, Cruz thinks it’s possible to pull a good war — with a clear enemy and a defined military objective — out of the bad war in Syria.

2. Should the U.S. admit Syrian refugees?

Cruz’s past position: Yes. “We have welcomed refugees, the tired, huddled masses, for centuries. That’s been the history of the United States. We should continue to do so,” he said on Fox News in early 2014. “We have to continue to be vigilant to make sure those coming are not affiliated with the terrorists, but we can do that.”

Cruz’s current position: No. Cruz would not admit Syrian refugees as a rule, but he would consider exceptions for Christian refugees from Syria. “There is no meaningful risk of Christians committing acts of terror,” he said in South Carolina last month.

Which sounds like: He changed his mind.

But: Cruz says the circumstances changed. He attributed his change of heart on the rise of the Islamic State and what he calls the incompetence of the Obama administration. Cruz said the administration has not shown itself capable of spotting Islamic State sympathizers if they blended in among the refugees.

3. Should undocumented immigrants be given a path to legal status?

Cruz’s past position: Yes. Or maybe “yes,” in air quotes. “If this amendment is adopted to the current bill, the effect would be that those 11 million under this current bill would still be eligible for [legal] status . . . so that they are out of the shadows,” Cruz said in 2013, arguing for an amendment to a Senate immigration-reform bill. “This amendment would allow that to happen.”

Cruz’s current position: No. “I have never supported legalization, and I do not intend to support legalization,” Cruz said in Tuesday’s debate as he attacked Sen. Marco Rubio (Fla.) for supporting a plan that would have given the undocumented a path to legal status and citizenship.

Which sounds like: Cruz switched his position, in order to appear more hard-line on immigration than his rival.

But: Cruz says he’s not being disingenuous now — but the implication is that he was being disingenuous then.

Yes, back in 2013, he appeared to support giving undocumented immigrants a path to legal status. But he didn’t mean it. Instead, Cruz was only pretending to support that idea, as part of a scheme to troll Democrats in the Senate.

It was supposed to work like this: Cruz wrote an amendment that would have allowed undocumented immigrants to stay in the country legally — but not ever become citizens. Then, he made Democrats vote against it, to prove (theoretically) that the Democrats’ motivations were crassly political. Democrats wanted citizenship because they wanted the new citizens’ votes.

“They do that in the Senate all the time,” a spokeswoman for Cruz said, talking about the amendment-as-trap ploy. “This is not a new strategy.”

But, in retrospect, it looks as if Cruz ended up trolling himself.

Because of his amendment, Cruz is now on video appearing to support something he says he opposes. And the anti-Washington candidate is stuck explaining again and again why he seemed to fulfill the worst stereotypes about Washington politicians: that they spend their days scoring political points.

“Looking back at what you said then, and what you’re saying now, which one should people believe?” Bret Baier of Fox News asked Cruz on Wednesday.

Cruz said, in effect, that voters should believe him now.

“They illustrated the hypocrisy of the Democrats. They showed that it was a partisan effort,” Cruz told Baier about his 2013 efforts, in an interview in which Cruz looked uncharacteristically rattled.

4. On whether the U.S. should offer more temporary visas to highly skilled foreigners.

Cruz’s past position: Yes. In 2013, Cruz offered an amendment to the immigration bill that would have increased the number of “H-1B” visas fivefold, from 65,000 to 325,000 per year. “There is currently a serious shortage of workers in the fields of science, technology, engineering and math, yet every year we send thousands of high-tech graduate students back to their home countries to start businesses and create jobs. This makes no sense,” Cruz said then.

Cruz’s current position: No. In fact, he has called for the government to stop issuing any of these visas for 180 days.

Which sounds like: Cruz bowed to pressure from anti- ­immigration groups, which say the H-1B visas are abused by companies, which fire American workers and replace them with foreigners.

But: Cruz says he changed his mind because of the abuses, which showed the Obama administration wasn’t overseeing the visa program properly. He said it “will be suspended until we can be certain that the program is no longer being abused.”

5. Should money cut from a $3 billion crop-insurance program be restored, giving an expensive boost to farmers?

Cruz’s past position: No, at about 8:43 p.m. on Dec. 3. “Mr. Cruz? No,” the Senate clerk read, after Cruz gave a hand signal to show he supported the cut.

Cruz’s present position: Yes, at about 8:46 p.m. the same day.

As Politico first reported, after his “no” vote, Cruz was accosted by Senate Agriculture Committee Chairman Pat Roberts (R-Kan.), a strong supporter of the crop- ­insurance program. The two talked. Cruz gave the “wait a minute” gesture and walked away, with Roberts calling after him.

Then Cruz came back to change his vote.

“Mr. Cruz? Aye,” the clerk said.

Which looks like: Cruz, the consistent conservative, changed his mind to please voters in the key early voting state of Iowa. “Crop flop: Cruz panders to King Corn,” was the headline on the anti-Cruz editorial page of the Union-Leader newspaper in Manchester, N.H.

But: Cruz’s people say he didn’t change his mind. He made a simple mistake, in a confusing series of votes. They say that Cruz didn’t realize what was up for a vote then, and didn’t mean to vote against crop insurance at all. “He essentially thought that he was voting on cloture for a bill, when it was voting for an amendment instead,” his spokeswoman said.

But that appears to conflict with what Roberts later told Politico. Roberts indicated that Cruz knew what he was voting on and had been persuaded to change his mind. Roberts said he had told Cruz that a “no” vote might hurt his prospects in the presidential race. It was the kind of appeal to which any politician might respond.

“There was a little matter that there was a state called Iowa that he might want to think about,” Roberts recalled saying, as Politico reported. Other reporters also heard Roberts tell the same story about persuading Cruz to change his vote by referencing Iowa.

Katie Zezima contributed to this report.