Mets co-owner Jeff Wilpon claims in new court papers that he’s always supported the first woman senior vice president in the team’s 52-year history – denying allegations he had her canned for having a baby out of wedlock.

Jeffrey I. Kohn, a lawyer for the thrifty team’s chief operating officer, said Wilpon has always shown “ long-standing support” for ex-Mets executive Leigh Castergine and that she was fired in August from her post heading ticket sales strictly because of workplace “issues and conflicts” with her immediate supervisors who didn’t include Wilpon.

“The termination of her employment was based on legitimate business reasons having nothing whatsoever to do with her gender, marital status, pregnancy or leave,” wrote Kohn, refuting allegations Castergine raised last month in a blockbuster Brooklyn federal court suit, including that Wilpon was “morally opposed” to her being pregnant and unmarried.

The suit claims that the son of Mets principal owner Fred Wilpon warned Castergine’s co-workers to refrain from taking any interest in her unborn child and even stated “in a meeting of the team’s all-male senior executives that he is ‘morally opposed’ to Castergine ‘having this baby without being married.’”

Castergine gave birth in March and returned to her job in June. The suit alleges Wilpon then told her that she wasn’t meeting ticket sales expectations for the struggling team and offered to let her remain through the end of the season if she promised to keep her mouth shut about the discrimination claims.

Castergine took several shots at the team in the suit, noting it “failed to field a winning team in six years,” “fans had … pledged not to attend any games until there was a change in ownership,” and comparing her job “to selling deck chairs on the Titanic.”

Castergine — who previously worked for the Philadelphia 76ers, Orlando Magic and Boston Bruins — is seeking unspecified money damages from Wilpon and the team.