A Democratic candidate for Congress in Central New York, Anthony Brindisi, accused Charter Spectrum, the national cable company, of trying to “censor” his campaign by refusing to air a television ad that criticizes the company’s record — along with his Republican opponent.

“If you’re watching this ad on Spectrum cable, you’re getting ripped off,” Mr. Brindisi, a state assemblyman, says to the camera at the start of the ad.

But Spectrum, which is the name under which Charter Communications operates in New York, has refused to air the campaign commercial, Mr. Brindisi said in an interview. He said that his campaign has successfully aired other ads on Spectrum in recent weeks, but the cable operator rejected this one over the weekend.

“They are trying to censor us,” Mr. Brindisi said, adding that Charter had not given a clear reason to his media team as to why they had rejected the ad. Mr. Brindisi, who is challenging Representative Claudia Tenney, a Republican, in a key battleground race, said he had hoped for the ad to also air on a dozen or so cable channels, such as CNN and MSNBC, in the Utica and Binghamton media markets. He said the ad is set to begin airing on broadcast networks, which Charter does not control, on Monday.