It’s often said that a picture is worth a thousand words. That is certainly true with respect to the massive migrant caravan from Central America that has arrived in Tijuana.

In this case, the picture is the map below. The blue path is the one that the migrants took to the San Ysidro Port of Entry at Tijuana/San Diego, CA. The red path is the one that they could have taken to the Hidalgo Port of Entry at Reynosa/McAllen, TX.

Notice the difference? The path to McAllen is approximately 1,300 miles long; whereas the path to San Diego is approximately 2,700 miles long. So the caravan travelled more than twice as far as it needed to.

Why in the world would they do that? They didn’t have their own vehicles, and they weren’t carrying enough food or resources to justify the longer journey.

There are two reasons. The first reason can be summed up in two words: Ninth Circuit. The caravan members have been advised by liberal immigration attorneys all along. Not only were the migrants coached on what to say when claiming asylum, they were also evidently coached on where to go.

Travelling the extra 1,400 miles to Tijuana/San Diego would take the migrants to the Ninth Circuit of the U.S. Court of Appeals, with its numerous judges willing to minimize the President’s statutory authority to restrict entry of aliens into the United States. And the presence of similar federal judges at the district level in California would increase the probability that the migrants’ attorneys would obtain an initial ruling in their favor.

And that’s exactly what happened. When President Trump exercised his authority under 8 U.S.C. 1182(f) to “impose on the entry of aliens any restrictions he may deem to be appropriate,” a federal judge in San Francisco issued a temporary restraining order blocking the President’s action. The Ninth Circuit will likely agree with the district judge. Even if the Trump Administration prevails in any appeal to the U.S. Supreme Court, it will take at least a year to reverse the district judge’s ruling.

The second reason for travelling twice the distance is that California is a sanctuary state with dozens of sanctuary cities like Los Angeles and San Francisco. Those jurisdictions will actively seek to protect the migrants who enter illegally from deportation.

On top of that, the state may interfere more directly with federal immigration enforcement. State Attorney General Xavier Becerra said recently that he might sue the federal government to stop the use of tear gas to defend the border or to stop the federal government from shutting down ports of entry. His argument is full of holes, but with the right judge that might not matter.

In contrast, in Texas, law enforcement agencies like the Texas Department of Public Safety cooperate with federal officials to improve border enforcement. To be sure, there are some sanctuary cities in Texas too; but it’s nothing like California.

In short, the migrants’ attorneys made sure that the caravan went the extra mile—or extra 1,400 miles—to arrive where the rule of law is the weakest in the United States. And their advice appears to be paying off. Federal immigration enforcement personnel can still prevail, but the playing field is tilted against them.

Kris W. Kobach is the elected Secretary of State of Kansas. An expert in immigration law and policy, he coauthored the Arizona SB-1070 immigration law and represented in federal court the 10 ICE agents who sued to stop Obama’s 2012 DACA executive amnesty. During 2001-03, he served as U.S. Attorney General John Ashcroft’s chief adviser on immigration and border security at the U.S. Department of Justice. His website is kriskobach.com.