Updated

A gunman was shot dead and three officers were injured on Monday following a hostage situation in Melbourne, Australia, where officials are investigating if the incident was terrorism related.

Emergency services were called to the apartment on Bay Street in Brighton about 4 p.m. local time for reports of an explosion, according to Sky News.

The body of a man, who appeared to have been shot, was discovered in the foyer of the apartment building.

"I got told there was an explosion around 4:00 p.m. I hung around for a while and I heard gunshots, about 10 shots, and we got told it was a hostage situation," a witness told Australian Broadcasting Corporation.

Officers tried to negotiate with the gunman in an apartment, Victoria state police Deputy Commissioner Andrew Crisp said. He left the building and opened fire on three officers before officers fatally shot him.

About 7:20 p.m. local time, Victoria police wrote on Twitter they have "resolved a hostage situation in Brighton, shooting a man dead and rescuing a woman being held against her will."

Three officers were injured — two were taken to the hospital and another was treated at the scene, Australian Broadcasting Corporation reported.

Officials are investigating whether the situation was terrorism related. The Seven Network television said it had received a phone call from a man who said: "This is for IS. This is for al-Qaeda" shortly before the shootout. The hostage was rescued safely.

The Associated Press contributed to this report.