AUSTIN, Texas ― Roughly 20 people were detained and served with misdemeanor trespassing tickets Monday after refusing to leave offices of Texas Gov. Greg Abbott unless he agreed to veto a Republican-backed effort to crack down on “sanctuary” jurisdictions.

The protest, led by immigrant rights activists, faith leaders and at least one elected official, aimed to force a public confrontation with the GOP governor, who is likely to disregard the pressure and eventually sign Senate Bill 4 into law.

The legislation, widely opposed by state law enforcement officials, would impose jail time and fines on local officials who decline to cooperate with every request by federal immigration authorities to detain an undocumented immigrant on their behalf. Draft versions of the bill, which have passed both chambers of the legislature, but have yet to be reconciled, would allow local police to ask about the immigration status of those they stop, including children.

Opponents say the bill will lead to increased deportations, undermine trust between police and immigrant communities, and put Hispanics at risk for racial profiling.

Dozens of activists gathered Monday morning in front of the south gates of the Texas Capitol, before marching down the street to the beat of a drum, chanting, “No SB4!” When the throng of protesters arrived at the State Insurance Building, where several of the governor’s offices are located, they walked up the stairs. Several sat in the lobby, vowing not to move.

“We don’t have rights,” activist Carmen Zubieta yelled in Spanish through a bullhorn. “And then they make a business out of putting us in jail,” she added ― a reference to the fact that roughly two-thirds of immigrant detention center beds are run as for-profit enterprises by private prison contractors.

Roque Planas/HuffPost Immigrant rights rights activists and faith leaders stage a sit in at the offices of the Texas governor on May 1, 2017.

Norma Herrera, another of the those who refused to move from the lobby, said she arrived in the United States from Mexico when she was 3 years old, and has since thought of herself as a Texan. She told the crowd she’d worked for the Texas legislature for three years, but with the passage of SB4 felt betrayed.

Herrera was among more than 100 religious leaders, immigrants, and law enforcement officials who registered opposition to the bill during committee hearings, without budging the legislature’s Republican majority.

“I considered myself an important part of that building,” Herrera said of the Texas capitol. “But now I see that, depending on the political climate, they can just police you out. … The process failed us.”

The group continued to chant and sing songs, including, “No Nos Moverán,” before splitting into two, with each of them blocking one of the main entrances to the building. “This entrance is closed! This entrance is closed!” they chanted, when people tried to enter or exit the building.

The protesters stayed for the rest of the business day, chanting, singing and holding a teach-in with legal experts who explained the implications of the law. The state Democratic Party chairman visited the group in the afternoon, describing the bill as a “racist” attack on Texas Hispanics and immigrant communities. The party had pizza delivered to the protesters, who didn’t budge until the building closed at 5 p.m.

By then, a May Day protest that began at City Hall had convened outside, with demonstrators shouting support for those occupying the governor’s office.

The confrontation grew increasingly tense. Police told protesters they would be arrested if they refused to leave, and escorted reporters outside. Roughly 20 activists remained seated in the lobby, repeatedly singing, “With hope, with prayer, we find ourselves here. With hope, and prayer, we’re right here,” for nearly a half hour.

Magistrate Judge Nick Chu entered the building as protesters were handcuffed with zip ties and served with trespassing citations. Authorities released them after issuing the tickets, saving them the spectacle of escorting the protesters in cuffs to the city jail in front of the crowds outside.

#sb4 sit in still going. Governor's offices closed 15 mins ago. pic.twitter.com/1GIgkic4Br — Roque Planas (@RoqPlanas) May 1, 2017

The baseline definition of a “sanctuary” jurisdiction is one that declines to reflexively honor requests from Immigration and Customs Enforcement to hold detainees who would otherwise be allowed to leave in local jails ― either because they weren’t charged with a crime, or they qualified for release on bond. By that standard, the only sanctuary jurisdiction in the state is Travis County, where Austin is located.

Austin City Councilman Greg Casar, who was among those charged, likened the Texas immigration crackdown bill to Arizona’s contentious SB 1070 ― a 2010 measure derided by opponents at the “show me your papers law.” Texas state government should expect litigation, he said.

“We won’t be coerced,” Casar told HuffPost. “Even if [Gov. Abbott] threatens us with criminalization, even if he threatens to remove us from office, we can’t betray our communities.”

George Lobb, a lawyer for Casar, said the protesters were exercising their rights to free speech and would take the trespassing charges to trial. He accused authorities of keeping him from seeing his clients and said Chu urged them to sign the citations without a lawyer present.

“When I woke up with this morning, the Constitution was still good law,” Lobb told Huffpost.

Texas Republicans have tried to pass some version of a “sanctuary city” ban for several years, but were unable to field enough votes in the state Senate. The bill finally made it through this year, after easing long-standing Senate rules that required a two-third vote in order to bring any bill for debate before the high chamber.