OXON HILL, Md. (WJZ) — A Prince George’s County Police Officer shot and killed a 29-year-old man Friday in Oxon Hill after the man allegedly pointed and tried to fire two replica guns at the officer, Prince George’s County Police said Saturday.

The officer, whom police did not identify due to the continuing investigation, tried to get Cedric Williams to leave an apartment complex in the 1100 block of Owens Road at about 12:45 p.m., police said. An employee of the complex told police Williams was banned from the property. The officer lives at the complex and was in uniform.

READ MORE: 'The School Shouldn't Be Open Right Now': Parents React To COVID-19 Outbreak At Cherry Hill Elementary Middle School

Williams, who did not have a fixed address, did not comply with the officer’s orders to leave, and a verbal confrontation between them became physical outside the building, before continuing to the road.

During the struggle, Williams pulled what appeared to be a handgun from a book bag and tried to fire it, police said. When the weapon did not fire, Williams tossed it into the woods. Police later determined it was a replica gun.

The officer used his Taser twice to tried to place Williams under arrest, but the Taser was not effective, police said.

READ MORE: Almost 9,000 Vaccinated Marylanders Get Additional Shots Since Approval of Pfizer Booster

Williams retrieved what appeared to be an AR-15-style rifle from the woods and pointed it at the officer, police said. The officer then shot Williams several times and killed him.

Police also determined later the rifle was a replica.

The officer was treated for minor injuries at a nearby hospital.

MORE NEWS: 'We're The Cure To This Situation': 9 Killed, 13 Wounded In Baltimore Over The Past Week

The officer joined the department in 2009. He is assigned to the Bureau of Patrol. As is standard procedure, he is now on administrative leave pending the outcome of the investigation. The Prince George’s County State’s Attorney’s Office reviews all officer-involved shootings.

CBS Baltimore Staff