The federal ban on political advertising on public TV and radio stations was struck down yesterday for a federal appeals court.

The decision could pave the way to a heavy dose of campaign ads on PBS and NPR leading up to the November elections.

By a 2-1 vote, the Circuit Court of Appeals in San Francisco said the rules would allow companies to advertise on PBS but prohibit candidates for political office from doing the same thing, violating the First Amendment’s free speech clause.

The court said lifting the ban would not undermine the educational nature of public broadcasts.

“Public issue and political speech, in particular, is at the very core of the First Amendment’s protection,” Judge Carlos Bea wrote.

“Public issue and political advertisements pose no threat of ‘commercialization,’ ” he said.

Minority Television Project, a nonprofit that runs the PBS station in San Francisco, had challenged the ban after being fined $10,000 for running paid ads from companies such as insurer State Farm and Chevrolet.