Days after Donald Trump was elected president, the mayor of this unabashedly liberal Texas capital reassured the vast majority of immigrants here illegally that he would try to keep the city a safe haven for them.
"Austin will not waver," Mayor Steve Adler told a crowd of hundreds who gathered outside City Hall for a pro-immigrant rally. "… In Austin, we do things our way and we will not stop."
Sally Hernandez, the new sheriff in Travis County, where Austin is located, announced the day Trump was inaugurated that she would not voluntarily comply with federal requests to detain people solely on the basis of their immigration status.
That spirit of defiance has spread across the city as activists, civic leaders and other public officials have joined the rebellion, setting up a spectacular showdown with the Republican governor and state Legislature.
Gov. Greg Abbott stripped the county of $1.5 million in criminal justice division grants for services for children, abused women and veterans in retaliation for its resolve to not cooperate with federal immigration authorities.
The state Senate passed a bill — which is making its way through the House — that would require local jails to comply with federal immigration requests and hold immigrants for up to 48 hours if they are in the country illegally. Sheriffs and police chiefs who refuse could be jailed for up to a year.
"Elected officials don't get to pick and choose which laws they obey," the governor said in his State of the State address in January. "To protect Texans from deadly danger, we must insist that laws be followed."
Just over a third of Austin's 931,000 residents are Latino, compared with 80% in El Paso or 63% in San Antonio.
Yet leaders say the city's identity — and business success — rests on being a tolerant and cutting-edge tech hub that welcomes immigrants.
"Apple, Facebook and Google want to be in Austin because of its culture," said Adler, a civil rights attorney before he became mayor.
Austin officials and other advocates for so-called sanctuary cities — which refuse to cooperate with Immigration and Customs Enforcement — argue that giving local authorities discretion to enforce immigration laws could encourage racial profiling and that cracking down on immigrants who are in the country illegally but otherwise law-abiding would discourage them from reporting crimes.
"We're putting public safety first, and that depends on a relationship of trust between our community and law enforcement," the mayor said.
Over four days in early February, federal agents fanned across the Austin region, detaining more than 50 immigrants who were in the country illegally.
The federal government denied its actions had anything to do with the sheriff's new policy, describing its actions as a routine "targeted" operation. But more than half of the immigrants detained had no criminal record — a substantially higher rate than other cities across the nation — and a federal magistrate judge said in court last month that immigration agents had warned him to expect a "big operation" as payback for the sheriff's stance.
The operation has had a chilling effect on the city's immigrant communities. Many who lack documentation have stayed in their homes, afraid to attend Mass or drive their children to school.
"Now that the law's changing, I'm afraid I'm going to lose my kids," said Patricia Martinez, a 35-year-old Mexican citizen who has been in the U.S. illegally for well over a decade.
A victim of domestic abuse, Martinez now lives in hiding in a shelter with her five daughters, all U.S. citizens. She planned to assign temporary guardianship to relatives with legal status in case she is deported.
Since federal agents detained a Mexican immigrant inside the Travis County courthouse last month as he left a hearing for misdemeanor charges of domestic assault and possession of marijuana, others without legal status have been reluctant to appear in court, even as witnesses, according to their attorneys.
Austin has been pushing back.
The local police force has held a string of town hall meeting to reassure immigrants they are not a target.
"We're telling them we're interested in your safety and we're not focused on your immigration status," said Brian Manley, Austin's police chief. "Every time my officers spend enforcing immigration law is time they're not spending fighting crime."
Activists have set up neighborhood warning systems, using telephones and social media to track law enforcement activity and alert people when to hide, and offering services and financial help to families who risk losing their main breadwinner.
The City Council has used money from its emergency relief fund to pay $200,000 to Catholic Charities of Central Texas, which provides immigrants with legal assistance and has seen its legal consultations double from 25 to 50 clients a week.
Some are legal residents who suddenly feel more urgent about applying for citizenship. Others want to know if they have any chance of legal status.
Lawyers are holding "Know Your Rights" meetings, and legal clinics are offering deportation defense.
In an effort to throw off federal agents, some attorneys have sought to keep clients out of court, by getting waivers from judges or in some instances entering guilty pleas.
"I kind of don't care that ICE knows that we're doing this," said attorney Daniel Betts. "If it continues, it's going to be a cat-and-mouse game."