The National Security Council contractor arrested on attempted murder charges Tuesday managed to obtain a contractor job and a security clearance at the White House despite a previous assault charge and domestic-violence allegations, court records show.

The Secret Service arrested Martese Maurice Edwards of Maryland early Tuesday after being notified that the Prince George’s County Sheriff’s Department had issued a warrant on May 17 for his arrest for attempted first-degree murder. CBS News reported that the arrest warrant, which remains sealed, alleges that Edwards shot his ex-girlfriend’s boyfriend.

A spokesperson for the National Security Council confirmed to The Daily Beast that Edwards held a security clearance and that the “administrative functions” the contractor performed required one. “Security clearances are required at the NSC,” the spokesperson said.

The spokesperson described Edwards as “an employee of a staffing firm who was assigned to provide temporary services to the National Security Council in December 2017.” Thee spokesperson added that “Mr. Edwards performed administrative functions and did not attend classified meetings. Prior to his arrest, Mr. Edwards’ access to White House facilities was revoked.”

In May 2015, Prince George’s County charged Edwards with second-degree assault. The case was later dismissed and listed as a decline to pursue it further. It’s unclear why county officials dropped the case.

Edwards also appears in Prince George’s County civil court records as the subject of a domestic violence proceeding in August 2013. In that case, the court issued interim and temporary orders that Edwards not abuse, contact, or enter the residence of the petitioner and stay away from their school and place of employment. The court dismissed the case in September 2013 after the petitioner failed to appear.

An online résumé for Edwards posted at LinkedIn claims he worked as a police officer at the Defense Intelligence Agency (DIA) beginning in 2012, but officials tell The Daily Beast that Edwards never worked at the agency. Edwards did apply for a position at DIA and received a conditional employment offer, according to a defense official, but never completed the required paperwork or background check and thus never received a position or gained active access to classified databases or sensitive information at the agency.

Edwards’ previous two run-ins with the law resulted in no convictions, which could explain how he was able to obtain a job at a sensitive government job like the White House. Clearance holders are obliged to self-report legal problems like an arrest or a protective order, but arrests or allegations absent a conviction do not necessarily disqualify employees from holding positions of trust, according to Brad Moss, an attorney who frequently represents clearance-holders.

“It is certainly possible to have past arrests or protective orders in your recent background and maintain a security clearance, especially when the matters were resolved without a criminal conviction,” Moss told The Daily Beast in an email. “It all depends on the particular circumstances. An individual can mitigate some of the concern by providing details about the situation, including to what extent the allegations were unfounded or unsubstantiated.”

— Lisa Schwartz contributed to this report