A man opened fire in a courthouse in Bavaria Tuesday, killing a woman and seriously injuring two other people, German officials said. The gunman then apparently killed himself.

The incident happened at the administrative court in Landshut, some 47 miles northeast of Munich.

Several shots were fired in the building at about 10:15 a.m., police spokesman Thomas Ploessl said. Another spokesman, Leonard Mayer, said the gunman then apparently killed himself.

Bavaria's state Interior Ministry said two people suffered serious injuries.

Elisabeth Waitzinger, a court spokeswoman, said the gunman and his victim were related. However, there was no immediate information on the identity of the shooter, a 60-year-old from the nearby town of Dingolfing, or a possible motive.

Asked how the gunman was able to bring a weapon into the building, Waitzinger said there are no checks on people attending civil cases of the kind the court handles.

Mayer said there had been no warning of the shooting, which came "out of a blue sky."

Horst Schladt, a regional prosecutor, said there was no longer any danger to people at the scene.

The court is located in a modern, six-story building outside the center of Landshut, a city of some 63,000 people.

Last month, 17-year-old Tim Kretschmer killed nine students and three teachers at his former high school in Winnenden, in southwestern Germany, before fatally shooting three others.

He then took his own life in an exchange of gunfire with police.