HONG KONG — An earthquake struck north of the Japanese city of Osaka on Monday morning, killing at least three people and injuring at least 217 others, the authorities and the local news media said.

The Japan Meteorological Agency said the 6.1-magnitude quake was recorded at 7:58 a.m. in the northern part of Osaka Prefecture in western Japan.

NHK, the public broadcaster, said the dead included a 9-year-old girl who was struck by the collapsing wall of a swimming pool at an elementary school in the city of Takatsuki.

The other two casualties were men in their 80s, one of them in Osaka.

Many commuters were stranded at stations when the earthquake disrupted train service across western and central Japan, the Kyodo News reported.