Restaurant chain Subway is firing about 300 people at its Milford, Conn., headquarters — the latest in a series of shake-ups at the struggling company.

The cuts, which sources say represent about a quarter of Subway’s staff, are so steep the Milford police were on hand to provide security at the company’s offices on Wednesday, a local TV station reported.

Subway is “streamlining and simplifying our business with a smaller and nimbler workforce that will help us react quickly to the changing needs of the business,” a Subway spokesman said. “In order to deliver on that strategy, a difficult decision was made to eliminate approximately 300 positions at our Global HQ in Milford, Connecticut.”

Among the people let go is Tracey Devine, whose job was to investigate franchisee complaints, a source told The Post. Subway’s 23,692 US restaurants are all owned by independent franchisees, some of whom have complained about the company’s handling of its sagging sales.

The cuts are the latest move by ex-Burger King Chief Executive John Chidsey, who took charge in November. Subway had seen at least six top executives in recent weeks announce internally they are leaving ahead of Wednesday’s bloodbath. Chidsey last month also announced plans to seize control of the bulk of the company’s advertising budget from its regional partners.

Subway, which has been in decline since 2015, when its longtime spokesman was busted for kiddie porn, has seen traffic decline 30 percent over the last five years amid growing competition for fast healthy fare.

Subway reached a peak in 2015 with 27,103 restaurants, according to Restaurant Business, citing Technomic data.