Thousands of people flocked to North Carolina's capital on Monday to show both support and disdain for a law that has thrust the state into the international spotlight over its restrictions on transgender bathroom access and gay rights.

Lawmakers returned to Raleigh to begin a short session designed to address the state budget. But controversy over the new law, which has drawn reaction from U.S. presidential candidates, U.S. President Barack Obama and British Prime Minister David Cameron among others, is expected to dominate.

RELATED: Transgender woman raped at Stonewall Inn: Police

The measure puts the state at the center of a debate over equality, privacy and religious freedom as states propose legislation seen as discriminatory against gay and transgender people in the wake of a U.S. Supreme Court last year ruling that legalized same-sex marriage.

North Carolina became the first U.S. state to require transgender people to use restrooms in public buildings and schools that match the sex on their birth certificate rather than their gender identity.

Fifty-four people were arrested at the Legislative Building as they protested against the law on Monday, General Assembly police Officer Scott Cameron said.

"Our state is a state of crisis," Chris Sgro, executive director of the Equality North Carolina advocacy group, said earlier in the day before activists delivered petitions to Republican Governor Pat McCrory's office demanding the law's repeal.

A group of Democratic representatives filed a bill seeking a repeal. But leading Republican lawmakers in the state have shown little willingness to back down, and they were greeted at a rally on Monday by thousands of people who came on church buses and held signs thanking them for the measure.

Business leaders, entertainers and politicians including Obama and Republican presidential front-runner Donald Trump have come out against the law. Opponents contend it demonizes transgender people and limits government protections against discrimination for gays and lesbians.

Supporters including social conservatives and Republican presidential candidate Ted Cruz say it is needed to protect women and children from sexual predators in bathrooms.

On Monday, singers Demi Lovato and Nick Jonas joined a growing list of entertainers who have canceled shows in the state. Lovato wrote on Twitter that she and Jonas were protesting "this hateful law."

RELATED: Whole Foods targeted in transgender worker’s lawsuit: Report

As part of the backlash, companies and associations have relocated conventions and halted job-creating investment projects initially slated for North Carolina.

Republican State Representative Paul Stam criticized companies, including PayPal Holdings, that have pulled jobs out of North Carolina over the measure.

"They have offices in countries where homosexuals are executed," he said. "The hypocrisy of those who oppose this bill is amazing."