After weeks of relative silence on the controversial subject of where transgender people should be able to go to the bathroom, Republican presidential candidates Donald Trump and Ted Cruz weighed in on the issue in a big way Thursday. Each took an opposing stance on North Carolina’s hotly contested House Bill 2, which includes a provision restricting transgender people from using the bathroom that corresponds with their identity.

Close video Donald Trump on NC transgender bathroom law Republican Presidential candidate Donald Trump makes remarks on a North Carolina law involving the use of bathrooms by transgender people. Republican Presidential candidate Donald Trump makes remarks on a North Carolina law involving the use of bathrooms by transgender people. share tweet email Embed

The contrasting positions — with Trump speaking out against the measure, and Cruz doubling down on his support — come with political risks for both White House hopefuls. For Trump, the remarks stand to alienate social conservatives and evangelical voters, who have so far turned out in surprising numbers for the New York businessman. For Cruz, meanwhile, the strong showing of solidarity with the North Carolina bill and its supporters could make him look even more insensitive toward LGBT Americans than he already does, having backed numerous “religious freedom” measures that many consider to be discriminatory. It’s an especially big gamble for the Texas senator to take ahead of the April 26 primary, when several northeastern states that value LGBT equality will vote.

But regardless of who pays the political price, the split among the two leading Republican presidential candidates reflects the ongoing division within the GOP over how to handle LGBT rights, as well as broader confusion on the national level about what it even means to be transgender.

On Thursday morning, Trump came out against North Carolina’s newly-enacted law, which negates all local nondiscrimination protections for the LGBT community and prohibits transgender people from using the restrooms in government buildings that correspond with their gender identities. Speaking in a town hall on NBC’s “Today,” the real estate mogul suggested that HB2 was unnecessary and certainly not worth the intense corporate backlash it has produced.

“There have been very few complaints the way it is,” Trump said. “People go, they use the bathroom that they feel is appropriate, there has been so little trouble. And the problem with what happened in North Carolina is the strife and the economic, I mean, the economic punishment that they’re taking.”

RELATED: Gov. McCrory stands behind parts of North Carolina’s ‘bathroom law’

Asked which bathroom he would want transgender icon Caitlyn Jenner to use were she to walk into Trump Tower, the Republican presidential front-runner said he would be fine with her using any bathroom she chose. He also said he opposes the idea of creating separate bathrooms specifically for transgender people to use.

“First of all, I think that would be discriminatory in a certain way,” Trump said. “It would be unbelievably expensive for businesses and the country. Leave it the way it is.”

The comments, though not exactly surprising, were unusual for Trump, who has not spent much time on the campaign trail discussing LGBT rights — an area where he is arguably more to the left than any of his Republican opponents, now or ever. Shortly after the town hall, Cruz forcefully rebuked his rival’s remarks, doubling down on a widely-used argument that nondiscrimination protections for LGBT people could put young girls in danger of being attacked in the bathroom by male predators. Any position to the contrary — including Trump’s — Cruz said, was “political correctness” at work.

view photo essay Political Theatre: The presidential campaign of Donald Trump “Make America Great Again.” 18 states plus the District of Columbia that bars LGBT discrimination in public accommodations, including public restrooms. “I’m the father of two little girls. Here is basic common sense. Grown adult men, strangers, should not be alone in a bathroom with little girls.”

It wasn’t the first time Cruz had suggested that allowing people to use the bathroom in accordance with their gender identity could potentially present a safety risk. Last week, Cruz called the North Carolina law “perfectly reasonable” in an MSNBC town hall and appeared to reject the idea that a person’s gender identity could ever be in conflict with the sex assigned to that person at birth — as is the case for transgender people.

But that line of argument, LGBT advocates say, is not rooted in fact. According to data from the U.S. Department of Justice, a majority of rapes are committed by someone known to the victim, not by some masked stranger. Furthermore, in none of the states that have adopted nondiscrimination protections for LGBT people has there been a corresponding spike in bathroom-related assaults. Transgender people are, in fact, far more likely to be the victims of discrimination, harassment and physical assault in the bathroom, rather than the perpetrators.

“Ted Cruz was acting irresponsibly today,” Mara Keisling, executive director of the National Center for Transgender Equality, told MSNBC. “He’s just spouting the same nonsense that [North Carolina] Gov. Pat McCrory has been spouting about transgender people being predators. It isn’t true, it isn’t fair, and what they’re finding out is, it isn’t as political expedient as they thought it was.”

RELATED: Cruz attacks Trump for transgender bathroom comments

Even though the public is roughly split on the bathroom issue — with 43 percent of respondents in a recent online Reuters/Ipsos poll saying they believe that public restroom use should be determined by a person’s sex on his or her birth certificate, and 41 percent saying it should hinge on gender identity — there appears to be a political cost to supporting measures seen as anti-LGBT. After Republican Gov. Mike Pence of Indiana signed a controversial “religious freedom” law last year that critics warned would make it easier to discriminate against LGBT people in the state, Pence’s approval rating dropped 17 points. He later passed on a highly anticipated presidential bid.

Weeks after signing HB2, McCrory is now feeling similar heat. The latest survey from Elon University showed McCrory, who’s up for reelection, six points behind his Democratic challenger, Attorney General Roy Cooper. The poll also found McCrory had just a 37% job approval rating — his lowest in two years.

“If you try to make hay out of marginalized people for political purposes, somebody might set the hay on fire,” Keisling said.

Despite the political risks, some Republicans still see an opportunity to score points with social conservatives and religious voters by opposing LGBT rights — particularly when it comes to the bathroom, where every civil rights battle has been fought, in part. From the civil rights movements of the 1950s until today, the safety arguments in favor of bathroom discrimination have been the most persuasive.

In Houston, a broad civil rights ordinance failed last year following months of aggressive campaigning that warned the measure could be exploited by male sex predators masquerading as transgender women. One particularly gruesome TV ad showed an adult man waiting in a bathroom stall until a young girl walked in, her face locked in an expression of terror as he followed her into the neighboring stall and shut the door behind them. The ordinance was rejected by a vote of 61 percent to 39 percent.

RELATED: Tar Heel tatters: LGBT law strips the state of business, investment

Republican strategist Keith Appell, who worked as senior adviser to former presidential candidate Carly Fiorina’s super PAC, sees that defeat as an a prime example of how Cruz can use Trump’s opposition to HB2 to his advantage, even as the race heads into the April 26 primary where four out of five of the northeastern states voting already ban discrimination in public accommodations on the basis of gender identity.

“There are lots of votes and delegates to be had in every one of these states that up until now, may have been headed toward Trump,” said Appell. “Even Houston, an overwhelmingly Democratic city, voted this thing down. So trying to interpret that this is where a majority of people are, much less a majority of Republican voters, is dicey. I think Trump has given Cruz a significant opening here.”

Others believe Cruz’s strong support of HB2 could do more harm than good. view photo essay The presidential campaign: Ted Cruz The Texas senator was first to announce his bid back in March, and has since been carefully laying the groundwork for a come-from-behind primary victory.

“It’s one of those anti-LGBT positions that quickly loses its effect when people have more information,” said Jennifer C. Pizer, law and policy project director and senior counsel at Lambda Legal. “In the Houston campaign, there were eight weeks with lots of money pushing these sexual predator ads. People can be triggered and scared. But when there’s a longer period of time, this kind of appeal can very quickly look mean.”

Gregory Angelo, president of the pro-LGBT Log Cabin Republicans, added that there aren’t many states left where voters will be swayed by Cruz’s brand of “misinformation and fear mongering.”

“Might Donald Trump take some sort of negative hit from social conservatives? Perhaps,” Angelo said. “But the social conservative bloc has largely already voted in this primary season. We’ve already passed ‘peak evangelicalism’ in this season. And a lot of those voters went to Trump.”