A former employee of a Fox station in Texas shot and killed himself outside the News Corp building early Monday, a law-enforcement official said.

The building, on Sixth Avenue in Manhattan, is home to 21st Century Fox and News Corp. The dead man was identified as Phillip Perea, 41, of Irving, Texas. Authorities said he shot himself once in the chest. Perea had previously worked for a Fox station in Austin, Texas.

Perea had also been handing out fliers, which criticized his employer for having “ended my career,” moments before he shot himself, the official said.

A suicide note and a gun were recovered at the scene, the official said. Perea was rushed to Bellevue Hospital Center, where he was pronounced dead about an hour later, police said.

"This morning, a former employee at Fox 7-KTBC committed suicide outside Fox Television Stations’ headquarters in New York City," said company spokesman Jack Abernethy. "He was employed at our Austin television station for ten months and has not been with the station or FTS since June 2014. We are deeply saddened by this tragedy."