A federal judge blocked a Trump administration policy of returning asylum-seeking Central Americans to Mexico while their requests for admission to the U.S. are adjudicated.

U.S. District Judge Richard Seeborg in San Francisco, an appointee of President Obama, on Monday ruled the administration lacked a legal basis under current law for adopting the policy. He also found the policy ran afoul of the U.S.’s legal obligations not to remove people to a country where their lives or freedom are threatened.

The...