County officials in Seattle can prohibit an advertisement criticizing Israeli policies toward Palestinians from appearing on local buses without violating constitutional protections on free speech, a U.S. appeals court said on Wednesday.

In a 2-1 ruling, the 9th U.S. Circuit Court of Appeals in San Francisco found that King County acted reasonably when it barred the ad, which sparked threats of vandalism and violence that could have endangered passengers.

Neither a King County spokesman nor a representative for the American Civil Liberties Union of Washington Foundation, which challenged the ban, was immediately available for comment.