An appeals court has upheld a ban on political advertising on public broadcasting — reversing an earlier ruling by members of the same court.

The 9th Circuit Court of Appeals, based in San Francisco, ruled against a public broadcaster seeking to have the ban overturned on 1st Amendment grounds. The broadcaster was also seeking to be able to run paid advertisements from for-profit companies.

Previously, a three-judge panel of the appeals court struck down the ban on political advertising but upheld the ban on for-profit advertising. But the federal government sought a rehearing in front of the full panel of judges.

This time, the court ruled 9 to 2 that striking down the political advertising ban "posed a threat to the noncommercial, educational nature of noncommercial educational programming" and that the government "has a substantial interest in imposing advertising restrictions in order to preserve the essence of public broadcast programming."

The case is Minority Television Project Inc. v. the Federal Communications Commission.

The broadcaster aired aids for Chevrolet, State Farm and other companies and was fined $10,000. It can still appeal to the Supreme Court.