Sanctuary City hearing in San Francisco

A federal judge in San Francisco heard arguments in the first lawsuit challenging President Trump's executive order to withhold funding from communities that limit cooperation with immigration authorities.

A lawyer for the Trump administration told the judge that an executive order targeting so-called sanctuary cities and counties was narrow and would now result in a loss of more than a billion dollars.

The hearing before the federal judge began at 9 a.m. and by 10:30 a.m. representatives from San Francisco and Santa Clara County left the courtroom pleased by what they heard.

The case brought before the federal judge William H. Orrick was filed by San Francisco and Santa Clara counties, requesting a suspension of President Donald Trump's executive order that threatens to withhold federal funds from sanctuary cities.

Trump signed the order in January and it targeted cities and counties that limit cooperation with federal immigration authorities. 

In the Bay Area San Francisco, San Jose, Santa Cruz and Alameda join Oakland as sanctuary cities.

Santa Clara County joined San Francisco requesting the court for nationwide preliminary injunction to halt the order considered to be un constitutional.

Santa Clara depends on $1.7 billion annually for federal money - about 35 percent of it's revenue.

The judge Friday sided with Santa Clara and San Francisco county.

David Cortese with Santa Clara County said the feds just didn't make a strong argument. This was just a hearing - a decision could come in days or weeks. Both sides will have the right to appeal any decision.