WASHINGTON – Congress can't stop President Trump's emergency declaration at the Mexican border, but the courts will have the final word.

After the president's veto Friday of a congressional resolution rescinding his action, three little-known federal district judges have the best chance to block the emergency declaration. At the same time, they will test Trump's theory that the judiciary is prejudiced against him.

One is a 25-year veteran of the federal court system who was born near the Mexican border and chosen by President Bill Clinton.

Another was the last judge named by President Barack Obama to the federal district court in Northern California five years ago.

A third is a former police officer who donated to Trump's 2016 campaign and was named to the federal bench the following year.

They run the political gamut from left to right. Whether that matters depends on who's talking.

To hear Trump tell it, the federal courts are run by "Obama judges" and others who bring their personal ideologies to the bench. He has singled out the U.S. Court of Appeals for the 9th Circuit, based in California, as a "dumping ground for certain lawyers looking for easy wins and delays."

"They will sue us in the 9th Circuit," Trump predicted about his emergency declaration last month. "We will possibly get a bad ruling, and then we'll get another bad ruling, and then we'll end up in the Supreme Court."

California and 19 other states did file their case in the San Francisco-based Northern District of California, guaranteeing that any appeal would be brought in the 9th Circuit. The Sierra Club, represented by the American Civil Liberties Union, also filed there.

The states' case, and possibly the other, will be heard by federal District Judge Haywood Gilliam, an Obama nominee. In a previous case, Gilliam sided with 13 states and the District of Columbia in their quest to block Trump administration changes to federal rules governing insurance coverage for contraceptives.

To hear Supreme Court Chief Justice John Roberts tell it, there's no such thing as an "Obama judge."

"We do not have Obama judges or Trump judges, Bush judges or Clinton judges," Roberts told the Associated Press this year in a rare rebuke of the president. "What we have is an extraordinary group of dedicated judges doing their level best to do equal right to those appearing before them. That independent judiciary is something we should all be thankful for.”

Choosing courts, not judges

What's clear is that not all the lawsuits challenging Trump's emergency declaration will be heard by liberal judges. Nor is it clear that it matters: Some judges nominated by Republican presidents have ruled against the administration on issues ranging from the separation of immigrant families at the border to the separation of a CNN correspondent from his White House press credential.

Three liberal groups – Public Citizen, the Center for Biological Diversity and the environmental group Earthjustice – filed separately in federal district court for the District of Columbia, where 11 of 14 judges were named by Democratic presidents. But the first two suits were assigned to Judge Trevor McFadden, nominated by Trump in 2017, and the third probably will be as well.

In Texas, where El Paso County is challenging the border emergency, District Judge David Briones picked up the assignment. The U.S. District Court for the Western District of Texas has mostly Republican-named judges, but Briones dates back to the Clinton administration.

"In terms of statistics, it came out differently than one might expect," Elliot Mincberg, senior fellow at the liberal interest group People for the American Way, said of the D.C. and Texas selections.

Federal district courts spread their caseloads among available judges, usually through a random drawing. At the appeals court level, clerks generally create three-judge panels randomly, mixing up the combinations monthly. Though "forum-shopping" by lawyers seeking friendly courts is common, the judges usually can't be predicted.

At the district court level, where the border emergency challenges will begin, judges conduct extensive fact-finding. For that reason, Mincberg said, "the political background of judges individually tends to be a little bit less important."

Later appeals to federal circuit courts and the Supreme Court use the facts to address legal and constitutional issues. Those courts are known for being more liberal – such as the 9th Circuit and the District of Columbia Circuit – or conservative, such as the 5th Circuit, which includes Texas.

Trump's losing streak

For now, the challenges will proceed slowly, partly because the Trump administration has yet to target specific funds not appropriated by Congress. The president's emergency declaration Feb. 15 is intended to free up $3.6 billion in military construction funds, in addition to nearly $1.4 billion approved by Congress and other monies he can access. For the coming fiscal year, Trump seeks an additional $8.6 billion for the wall.

The first hurdle facing all the challengers will be to prove that they have something to lose, therefore a right to sue.

Twenty state attorneys general, led by California's Xavier Becerra, claim the emergency declaration would redirect drug interdiction money and other funds that would have gone to their states.

The Sierra Club and ACLU argue it would harm border communities, endanger wildlife and damage the environment. The Center for Biological Diversity says its members hike, camp, study wildlife and conduct scientific, vocational and recreational activities along the border. Earthjustice specifies the risk to graves and spiritual ancestral sites.

Public Citizen's lawsuit was filed on behalf of landowners in South Texas and others whose property could be threatened by the border wall. El Paso County says the emergency declaration would damage its reputation and economy.

If past is prologue on immigration-related cases, Trump's chances of being upheld in the lower courts isn't good – particularly in the Northern District of California.

There, Judge William Alsup blocked Trump's effort to end protections for undocumented immigrants brought to the USA as children. Judge Edward Chen blocked his plan to end "temporary protected status" for immigrants fleeing Haiti, Sudan, Nicaragua and El Salvador. Judge William Orrick blocked him from denying funds to sanctuary cities that don't cooperate with federal immigration officials. Judge Jon Tigar refused to let him deny asylum to migrants crossing the Mexican border illegally.

Weeks ago, Judge Richard Seeborg became the fifth to enter the fray, declaring the administration's plan to add a question on citizenship to the 2020 census unconstitutional.

Now it will be Gilliam's turn. The 49-year-old former federal prosecutor is among 17 of the 19 Northern District of California judges named by Democratic presidents.

When he blocked Trump from changing Obama's "contraception mandate" in the states that challenged the administration's action, Gilliam said it would cause a "substantial number" of women to lose birth control coverage. He called that potential a "massive policy shift."

Whether that makes him an "Obama judge" in Trump's terminology – or part of Roberts' "independent judiciary" – will be something for both sides to judge.