AUSTIN, Texas (Reuters) - A U.S. appeals court on Monday issued a mixed decision on a Texas law to punish “sanctuary cities,” allowing a section requiring localities to abide by federal requests for checks on detainees’ immigration status to take effect, but blocking other parts.

The Republican-backed law is the first of its kind since Republican Donald Trump became president in January, promising to crack down on illegal immigration and communities that protect the immigrants. Texas has the longest border with Mexico of any state, and its policies often influence other Republican-controlled states.

In late August, Chief U.S. District Judge Orlando Garcia in San Antonio found the legislation was unlikely to withstand constitutional scrutiny and blocked sections of the law just days before it was to take effect.

The case is on appeal, but a three-judge panel of the 5th U.S. Circuit Court of Appeals on Monday gave the go-ahead to a section of the law requiring law enforcement agencies to “comply with, honor, and fulfill” any immigration detainer request by U.S. Immigration and Customs Enforcement.

It limited the decision by saying: “Law enforcement agencies need not comply with or fulfill a detainer request when a detainee ‘provide(s) proof’ of lawful immigration status.”

The court left in place Garcia’s block on parts of the law that call for fines and prison sentences for local officials who fail to cooperate with U.S. immigration officials.

The appeals court has yet to render a full decision on the law, also known as Senate Bill 4 (SB 4).

“Although the court allowed certain provisions to take effect, most of the law remains enjoined and the provisions that are allowed to take effect have been significantly narrowed,” said Lee Gelernt, an attorney with the American Civil Liberties Union, who argued in court against the law.

Texas Republican Attorney General Ken Paxton, whose office argued in support of the law, praised the decision.

“Enforcing immigration law helps prevent dangerous criminals from being released into Texas communities,” he said in a statement.

So-called sanctuary cities often do not use municipal funds or resources to enforce federal immigration laws. Sanctuary supporters say enlisting police in deportation actions undermines community trust in local law enforcement, particularly among Latinos,

Texas Republican leaders have not identified any sanctuary cities in the state. The major cities that were plaintiffs in the suit said they were abiding by all legal U.S. detainer requests.