A strong earthquake has killed at least three people and injured more than 210 in western Japan.

A nine-year-old girl was killed by a falling wall at her school, and the two other fatalities were men in their 80s, as the quake knocked over walls and set off scattered fires around metropolitan Osaka.

The Fire and Disaster Management Agency said 214 people were treated for injuries in hospital, most of them in Osaka — Japan’s second city.

Osaka officials did not give details, but injuries reported in Kyoto and three other neighbouring regions were all minor.

Smoke rises from a house blaze in Takatsuki
Smoke rises from a house blaze in Takatsuki (Yohei Nishimura/Kyodo News/AP)

The Osaka government’s disaster management department confirmed the girl’s death and the death of an older man. The third victim died in the nearby city of Ibaraki.

A falling concrete wall knocked down Rina Miyake as she walked by at her primary school in Takatsuki.

NHK public television aired footage showing the collapsed upper half of the high wall, which was cheerfully painted with trees, flowers and blue sky.

Takatsuki mayor Takeshi Hamada apologised over her death because of the wall’s collapse. The structure was old and made of concrete blocks — a known risk in earthquakes.

A crack is filled with water on a road after water pipes were broken in Takatsuki
A crack is filled with water on a road after water pipes were broken in Takatsuki (Keiji Uesho/Kyodo News/AP)

A man in his 80s died in the collapse of a concrete wall in Osaka city, and an 84-year-old man in nearby Ibaraki died after a bookshelf fell on top of him at home, according to city officials.

Many homes and buildings, including a major hospital, were temporarily without power.

The magnitude 6.1 earthquake struck shortly after 8am north of Osaka, at a depth of about eight miles, the Japan Meteorological Agency said.

The strongest shaking was north of Osaka, but the quake rattled large parts of western Japan, including Kyoto, the agency said.

Dozens of domestic flights in and out of Osaka were grounded, while train and subway service in the area, including the bullet train, were suspended to check for damage.

The earthquake reminded many in Japan of the magnitude 7.3 Hanshin-Kobe quake in 1995 that killed more than 6,000 in the region. Monday’s quake also followed a series of smaller quakes near Tokyo in recent weeks.