Critics trying to shut Chick-fil-A because its CEO opposes gay marriage are undermining the Constitution, Mayor Bloomberg declared yesterday in a stirring defense of the embattled fast-food chain.

“It isn’t the right thing to do and it isn’t what America stands for,” Bloomberg said on his weekly WOR radio show as protesters held a “Kiss-In” at the chicken eatery’s outlets.

“And those people who don’t like [Chick-fil-A] don’t understand their rights were protected by people who took a difficult position in the past and stood by it. They stood up so everybody else would be free.”

The mayor, a staunch advocate of marriage equality, argued that Chick-fil-A CEO Dan Cathy has as much right to his views as does the Catholic Church, which also opposes same-sex marriage.

“I don’t agree with this guy,” Bloomberg said of Cathy. “I don’t agree with the position of the Catholic Church. That doesn’t mean I don’t have an enormous amount of respect for the two cardinals we have here and the clergy and the people who are Catholic.”

Bloomberg said the government is barred under the Constitution from imposing a “litmus test” on people’s beliefs as a condition of doing business.

And he pointedly warned that the City Council should avoid such bullying because it will only discourage companies from wanting to locate here and do business.