Leigh Castergine, a former top ticket-sales executive for the Mets, filed suit in federal court in Brooklyn on Tuesday, accusing the team and its chief operating officer, Jeff Wilpon, of discriminating against her for being pregnant without being married.

She said Wilpon fired her last month in retaliation for complaining about him to the team’s human resources department. Among other things, she said Wilpon told her that “when she gets a ring, she will make more money and get a bigger bonus.”

Castergine, who was hired after the 2010 season, said in her court papers that she modernized the team’s ticket-sales operation, received raises of $50,000 in both 2012 and 2013 and a $125,000 bonus in 2013, and earned a promotion to senior vice president.

She described an environment in which she quoted Wilpon saying at a meeting: “I am as morally opposed to putting an e-cigarette sign in my ballpark as I am to Leigh having this baby without being married.” She said that higher-level executives did nothing about Wilpon’s remarks and that the head of human resources urged her to quit.