LONG BRANCH — A homicide investigation turned deadly this weekend when police went to an apartment with a warrant and encountered a man who began shooting at them, striking an officer, prosecutors said.

The gunman was eventually killed by police after an hours-long standoff.

Officials said that while the officers were in Apartment 1 of 274 Chelsea Ave. on Friday evening, a man entered the room and opened fire, hitting an officer in the leg.

Officers retreated and the man barricaded himself until officers said gunfire erupted inside the apartment about 2 a.m.

The man came out as he fired his weapon and officers shot back, prosecutors said.

274 Chelsea Ave, Long Branch. (Google Maps)

One of the officers' shots struck the man, who was eventually pronounced dead at the scene, according to the state Attorney General's Office, which routinely investigates police-involved shootings.

The officer who was shot was released from the hospital Friday evening.

State officials said the initial warrant involved a homicide investigation but they did not publicly release other details, including the name of the man who was killed.

Sergio Bichao is digital managing editor of New Jersey 101.5. You can contact him at sergio.bichao@twnsquaremedia.com

The 10 Most Stolen Vehicles In New Jersey

Answers to 25 common COVID-19 vaccine questions

Vaccinations for COVID-19 began being administered in the U.S. on Dec. 14, 2020. The quick rollout came a little more than a year after the virus was first identified in November 2019. The impressive speed with which vaccines were developed has also left a lot of people with a lot of questions. The questions range from the practical—how will I get vaccinated?—to the scientific—how do these vaccines even work?

Keep reading to discover answers to 25 common COVID-19 vaccine questions.