A student opened fire on Thursday at a university in Prague, killing at least 14 people and injuring more than 20, officials said.

The incident marks the Czech Republic’s worst mass shooting.

The bloodshed took place in the philosophy department building of Charles University, where the gunman was a student, Prague Police Chief Martin Vondrasek said.

The gunman also died, authorities said. His name has not been released.

Mr Vondrasek said in the evening that 14 people had died and 25 were injured, after earlier reporting that 15 had died and 24 were hurt. He did not explain the change. Authorities warned that the death toll could rise.

Police gave no details about the victims or a possible motive for the shooting at the building located near the Vltava River in Jan Palach Square.

Czech interior minister Vit Rakusan said investigators do not suspect a link to any extremist ideology or groups.

Mr Vondrasek said police believe the gunman killed his father earlier on Thursday in his hometown of Hostoun, just west of Prague, and that he had also been planning to kill himself. He did not elaborate.

Later on Thursday, Mr Vondrasek said that based on a search of his home, the gunman was also suspected in the killing of another man and his two-month-old daughter on December 15 in Prague.

The chief described the gunman as an excellent student with no criminal record, but did not provide any other information.

The gunman suffered “devastating injuries” but it was not clear if he killed himself or was shot to death in an exchange of gunfire with officers, Mr Vondrasek said, adding that there was “nothing to suggest that he had an accomplice”.

The gunman legally owned several guns — police said he was heavily armed on Thursday and was carrying a lot of ammunition — and that what he did was “well thought out, a horrible act”, Mr Vondrasek said.

Czech Shooting
A woman lights candles outside the scene of the shooting (Petr David Josek/AP)

University authorities said they would tighten security in university buildings with immediate effect.

“We mourn the loss of life of members of our university community, express our deepest condolences to all the bereaved and our thoughts are with all those affected by the tragedy,” Charles University said in a statement.

The building where the shooting took place is in Jan Palach Square, a busy tourist area in Prague’s Old Town.

It is just a few minutes’ walk from the picturesque Old Town Square, a major tourist attraction where a popular Christmas market attracts thousands of visitors.

The government quickly sought to quell concerns that the massacre was backed by foreign interests.

“There’s no indication that it has anything to do with international terrorism,” Mr Rakusan said.

“It’s a horrible crime, something the Czech Republic has never experienced.”

Pavel Nedoma, the director of the nearby Rudolfinum Gallery, said he watched from a window as a person standing on a balcony of the building fired a gun.

Czech Shooting
Police officers stand on the balcony of the philosophical faculty of Charles University (Petr David Josek/AP)

Authorities evacuated everyone from the building and police said they were still searching the area, including the balcony, for explosives.

The building forms part of the square and faces a bridge across the river with a view of Prague Castle, the seat of the Czech presidency.

President Petr Pavel said he was “shocked” by what happened and offered his condolences to the relatives of the victims, as did leaders of Germany, France and Slovakia, the European Union and Israel.

White House press secretary Karine Jean-Pierre sent a message of condolence.

She said: “The president and the first lady are praying for the families who lost loved ones and everyone else who has been affected by this senseless act of violence.

“On behalf of the United States, we send our condolences and also wish the survivors of this tragic event a speedy recovery.”

The Czech government declared Saturday a national day of mourning to honour the shooting victims, prime minister Petr Fiala said.

Previously, the nation’s worst mass shooting was in 2015, when a gunman opened fire in the south-eastern town of Uhersky Brod, killing eight before fatally shooting himself.