Gov. Jerry Brown on Thursday vetoed legislation aimed at barring U.S. Immigration and Customs Enforcement agents from arresting undocumented immigrants in state courthouses.

In a brief veto message, Brown said that while he supports the “underlying intent,” he feared what he called “unintended consequences.”