PITTSBURGH (KDKA) — Police were called to an attempted home invasion in Dormont early Sunday morning.

The attempted invasion and robbery happened on the 1500 block of Kelton Avenue at 8:45 a.m.

READ MORE: The Search For Kodiak, The National Aviary's Steller's Sea Eagle, Continued On Sunday

Dormont Police arrived at the scene and found the man who was leasing the residence that was nearly broken into.

The resident said that he heard noises at the door of his apartment and that another man, 28-year-old Joel Hatfield, tried to force his way into the apartment with a knife. The resident was armed with a gun, and a fight broke out between him and the Hatfield.

The resident struck the intruder in the head with the pistol and accidentally fired off a shot. Hatfield then fled the residence.

READ MORE: Son Of Carnegie Mellon University President, Thomas Jahanian, Dies After Being Pulled From Monongahela River

Hatfield is homeless, but is often in the Dormont area. He was taken into custody on Tuesday without incident.

He is the Allegheny County Jail.

(Photo Credit: Allegheny County Police)

He is facing charges of aggravated assault and burglary.

Witnesses also said that two other unknown people fled from around the apartment with Hatfield.

MORE NEWS: Curtains Up: Live Performances Return To Cultural District With Safety Precautions In Place

Allegheny County Police are asking anyone with information on the incident to give them a call.