A security guard caught apparently masturbating during a San Diego Chargers game on Sunday has been fired, The Post has learned.

A video posted on Facebook shows the unidentified guard seemingly pleasuring himself just steps away from cheerleaders at Qualcomm Stadium during the Chargers’ game against the Oakland Raiders. Company officials from San Diego-based Elite Security confirmed the termination on Tuesday afternoon, less than 24 hours after versions of the video surfaced online.

“Elite would like to apologize to anyone who was offended by this isolated incident,” read a statement by the company to The Post. “Additionally, Elite has opened a formal investigation into the matter and has acted swiftly in terminating the employee involved.”

The man did pass all state and federal background screening processes and completed all licensing requirements, the company said.

“There was nothing in the screening process that would indicate that this type of conduct was foreseeable,” the statement continued. “Elite has been providing staffing at Qualcomm Stadium for over 20 years and has never experienced this type of incident involving any of its employees. Elite has many loyal hard working employees and they should not be judged by the actions of this one regretful isolated incident.”

The company declined to identify the security guard, citing privacy laws, but said they were working with the authorities.

Earlier Tuesday, team officials confirmed the “disturbing actions” caught on the video in an email to The Post.

“The Chargers, Elite Security as well as the San Diego Police Department are aware of the disturbing actions of an Elite Security staff member at Sunday’s game,” the statement read. “We apologize to any fans who may have witnessed the incident. Elite Security is currently investigating the incident and has vowed to take immediate and appropriate action.”

Lt. Scott Wahl of the San Diego Police Department confirmed they are investigating the incident, but declined to discuss what charges — if any — the man may face.

“We have just been made aware of the situation through the media,” Wahl wrote in an email.