Immigrants who are caught entering the U.S. illegally have no right to legal representation, a federal appeals court in San Francisco ruled on Tuesday.

The Ninth U.S. Circuit Court of Appeals upheld the deportation of a Mexican immigrant who was arrested while crossing into the U.S. in 2012 and returned to his country the following day.

The...