Ted Cruz has made no secret of his dislike of what he calls "New York values." But now Cruz needs the support of New York voters if he is to stop Donald Trump from winning the Republican presidential nomination.

It's only been a few months since the Texas senator went after Trump with a campaign ad highlighting the billionaire's past support for abortion rights — aimed at casting doubt on Trump's conservative bona fides.

The ad was launched ahead of the Iowa caucuses and included an archival clip of Trump saying he'd lived in New York City all his life, "So, you know, my views are a little bit different than if I lived in Iowa." The ad's narrator concluded: "Donald Trump. New York values. Not ours."

That sparked an outcry from New Yorkers. It was even suggested that Cruz's comment was meant as an anti-Semitic dog whistle.

During a debate in South Carolina in January, Cruz defended the ad. He said that there are "wonderful working men and women in the state of New York, but everyone understands that the values in New York City are socially liberal, are pro-abortion, are pro-gay marriage, focus around money and the media."

In one of his biggest debate moments of the campaign, Trump fired back, calling New York a "great place" with "loving people, wonderful people."

And then, Trump invoked Sept. 11:

"When the World Trade Center came down, I saw something that no place on Earth could have handled more beautifully, more humanely than New York. You had two 110-story buildings come crashing down, I saw them come down, thousands of people killed, and the cleanup started the next day, and it was the most horrific cleanup, probably in the history of doing this, and in construction, I was down there. And I've never seen anything like it. And the people in New York fought, and fought, and fought, and we saw more death and even the smell of death, nobody understood it, and it was with us for months, the smell. The air. And we rebuilt downtown Manhattan, and everybody in the world watched, and everybody in the world loved New York, and loved New Yorkers. And I have to tell you, that was a very insulting statement that Ted made."

Ahead of New York's April 19 primary, Cruz is arguing that his decisive win in Wisconsin is a turning point in the campaign that will propel him to the nomination. But he's also being forced to once again defend his words about New York.

Cruz says he's met New Yorkers on the campaign trail who share his dislike for "the values of the liberal Democratic politicians that have been hammering the people of New York for a long time."

Cruz press secretary Catherine Frazier told NPR she believes New York conservatives "know exactly what Ted Cruz was talking about. What he's talking about are the liberal values of New York politicians who have embraced gun control; they haven't respected those who have the values of pro-life. This is about the politics and the values of the politicians that run the state, and we think Republicans in New York realize that, and I think that is something they can absolutely get behind."

Cruz's Past Remarks And Votes Return To Haunt Him

That is not necessarily leading to New York Republican support for Cruz. U.S. Rep. Peter King, R-N.Y., for one, is saying he'd never support Cruz. King backed Florida Sen. Marco Rubio for the nomination before Rubio dropped out of the race.

A former Republican congresswoman from New York, Nan Hayworth, said in an email to NPR that she believes Cruz's "New York values" comment will hurt him in her state. She had backed Carly Fiorina, who got out of the race and eventually endorsed Cruz.

"While I very much admire Sen. Cruz for having had the gumption to inform Iowans that he opposes ethanol subsidies — a fiscal position that is, like most of his fiscal positions, correct — when it comes to his previous assertions about New York, his boldness was unwise," Hayworth said.

Hayworth also said that some of Cruz's policy positions, including his votes against Hurricane Sandy relief and compensation for Sept. 11 victims, "will sit very poorly with New Yorkers."

The Empire State's demographics are less favorable for Cruz in comparison, for example, with Iowa and Wisconsin. And it's home turf for Trump, who is way ahead in the polls. While rural and suburban areas may be friendlier to a candidate like Cruz, he has to win over a majority of New York Republicans. Nearly 53 percent live in the New York City metro area, according to current voter registration data.

Cruz senior communications adviser Jason Miller said the campaign will continue to use its sophisticated data and analytics operation to spend time in areas of the state where advisers see opportunities for Cruz to make inroads.

"We're gonna go where we believe we have the best chance to win delegates," he said.

Copyright 2016 NPR. To see more, visit http://www.npr.org/.