ZAGREB, Croatia — A gunman on Monday shot and wounded a police officer outside the Croatian government headquarters in the capital, Zagreb, before killing himself, police said.

The shooting happened around 8 a.m. at Trg Svetog Marka, or St. Mark's Square, which hosts the Croatian parliament building and other other important state institutions.

Police said another officer at the scene fired at the attacker who fled after the shooting and later committed suicide nearby. They said he was a 22-year-old Croatian citizen not previously known to the police.

Croatian media reported the attacker posted a message on Facebook after the shooting saying there has been "enough fraud" and "trampling of human values." Reports said he was from the central town of Kutina and he was described as "decent" by acquaintances.

The 31-year-old officer underwent surgery and his condition is stable, said the police. He had four wounds, to his torso and one arm, but no vital organs were hit, doctors said.

Prime Minister Andrej Plenkovic said an investigation is underway to determine whether the shooting was an "event of individual character."

"We do not know enough at this moment," Plenkovic told reporters. He said the attacker walked to the square, which is open to the public despite hosting top state institutions.

"We have a culture of openness," said Plenkovic. "This brings us to a new situation and rethinking of security."

Interior Minister Davor Bozinovic said the only way to fully secure the square is to close it to the public. Bozinovic said "that would mean no freedom of movement."

N1 TV said the shooter had an automatic weapon. The Index news portal said he took the weapon from his father who fought in a war in Croatia in the 1990s.

In a statement, Croatian President Zoran Milanovic urged better weapons control in Croatia. He said the gun used in the incident is a military one and should not be part of "private collections."

Police sealed off the area around the square and all planned activities by the government or other state institutions at the square were canceled.

A helicopter could be seen flying over the city.

_____

Jovana Gec in Belgrade, Serbia, contributed to this report.