WASHINGTON — The Supreme Court seemed likely Wednesday to reinstate the trespassing conviction of a man who was caught protesting military activities in a place he had been ordered to avoid: the zone designated for demonstrators outside the main gate at a California air force base.

Protester John Dennis Apel tried to persuade the court that his case raised important First Amendment issues. But the justices focused instead on the federal law under which Apel was convicted, which gives commanding officers authority to prevent people from entering military installations.

When Erwin Chemerinsky, the constitutional scholar representing Apel, tried to get the court to turn to Apel’s free speech rights, Justice Antonin Scalia cut him off.

Apel has been visiting the designated protest zone at Vandenberg Air Force Base on the central California coast for 14 years. He had previously run into trouble at the base when, in 2003, he threw 4 ounces of his own blood on the Vandenberg sign.

That incident led to the first of several orders barring him from entering any part of the base, including the protest area on a public highway that passes near the main gate. The military owns the highway but grants the state and Santa Barbara County an easement so the public can use it. The protest zone was set up in the late 1980s as part of the settlement of a federal lawsuit.