Donald Trump at the Stephen Decatur High School, April 20, in Berlin, Md. (Evelyn Hockstein for The Washington Post)

Republican presidential candidate Donald Trump on Thursday took a stand against a controversial law in North Carolina that critics say unfairly targets transgender people, calling it unnecessary and pointing to the severe outcry it has prompted nationwide.

The law requires transgender people to use restrooms that match the gender on their birth certificates. The law also included a provision that bars local city councils from passing anti-discrimination regulations protecting LGBT people.

“You leave it the way it is. There have been very few complaints the way it is. People go, they use the bathroom that they feel is appropriate. There has been so little trouble,” Trump said during an appearance on NBC’s “Today” show Thursday morning. “And the problem with what happened in North Carolina is the strife and the economic. … I mean, the economic punishment they’re taking."

At a rally in Frederick, Md., GOP presidential candidate Ted Cruz panned rival Donald Trump's opposition to a North Carolina bill prohibiting transgender people from using bathrooms consistent with their gender identity. Cruz asked the crowd, "Have we gone stark raving nuts?" (Reuters)

The law has prompted severe backlash — not just among LGBT activists but also from big businesses. PayPal and Deutsche Bank took steps to stop proposed expansions in the state, while others, such as American Airlines and Apple, have raised significant concerns.

The comments come as the real estate mogul appears increasingly poised to clinch the GOP nomination, in which GOP strategists have suggested he would need to pivot sharply away from his brash, controversial style to appeal to moderates and younger voters.

If he is the nominee, he will probably face Democratic front-runner Hillary Clinton in November, who has advocated on behalf of LGBT rights.

Trump said that he is not sure whether he has transgender people working in his organization but said that there "probably" are. "Today" show co-host Matt Lauer asked Trump what he would prefer if someone like Caitlyn Jenner, a prominent transgender woman, walked into Trump tower and needed to use a restroom.

“So if Caitlyn Jenner were to walk into Trump Tower and wanted to use the bathroom, you would be fine with her using any bathroom she chooses?” Lauer asked.

“That is correct,” Trump said.

He added that creating transgender-specific bathrooms would be “discriminatory in a certain way.”

Sen. Ted Cruz blasted Trump on Thursday.

"Donald Trump is no different from politically correct leftist elites. Today, he joined them in calling for grown men to be allowed to use little girls’ public restrooms. As the dad of young daughters, I dread what this will mean for our daughters - and for our sisters and our wives. It is a reckless policy that will endanger our loved ones," Cruz said in a statement.

"Yet Donald stands up for this irresponsible policy while at the same time caving in on defending individual freedoms and religious liberty. He has succumbed to the Left's agenda, which is to force Americans to leave God out of public life while paying lip service to false tolerance," Cruz said.