SAN MARCOS, Texas (KXAN) – An off-duty Kyle Police Department officer was shot at a San Marcos apartment complex early Saturday morning, according to the San Marcos Police Department.

Just after midnight Saturday morning, San Marcos police were dispatched to the Encino Pointe Apartments at 1800 Post Road in response to a shooting. 911 calls referenced multiple gunshots at a unit in the building, according to SMPD.

Kyle police said the officer lives and serves as the resident courtesy officer at the apartment complex.

The officer told police that he heard gunshots or fireworks and approached a male and a female outside of an apartment unit, while wearing his police badge, to investigate the noises. The male pulled out a gun, pointed it toward the officer and fired two shots with one striking the officer, per SMPD.

The officer was transported to Ascension Seton Hays Hospital in Kyle and is expected to recover, according to police.

The officer involved in the shooting returned fire during the incident, but the suspect was not hit. The suspect fled, but SMPD officers located him and identified him as 22-year-old Joseph Sifuentes, SMPD said.

San Marcos police said when officers went to investigate, they identified Sifuentes who matched the officer’s description. After obtaining a search warrant, they found a firearm they believe Sifuentes used in the shooting, according to police.

Sifuentes was transported to the Hays County Jail and has been charged with attempted capital murder of a peace officer, aggravated assault with a deadly weapon and obstruction or retaliation. SMPD said Sifuentes also faces several other charges related to previous arrest warrants.

This investigation is ongoing and the Texas Rangers are assisting San Marcos police.