An earthquake knocked over walls and set off scattered fires around metropolitan Osaka in western Japan on Monday, killing at least four people and injuring more than 300.

The latest victim of the 6.1 magnitude quake was an 81-year-old woman who died after a wardrobe fell on her at home.

A nine-year-old girl died when a concrete wall outside her school fell on the street as she walked by, and two men in their 80s died after being hit by falling objects.

The Fire and Disaster Management Agency said 307 people were treated at hospitals. Most of the injured were in Osaka — Japan's No. 2 city bustling with businesses. Osaka officials did not give details, but the injuries reported in Kyoto and three other neighbouring prefectures were all minor.

The earthquake struck shortly after 8 a.m. north of Osaka at a depth of about 13 kilometres, 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 Osaka area, including the bullet train, were suspended to check for damage. Passengers exited trains on the tracks between stations.

People pause to look at a collapsed house in Ibaraki City, north of Osaka. (AFP/Getty Images)

By evening, bullet trains and some local trains had resumed operation, and stations were swollen with commuters trying to get home, many of them waiting in long lines. An exodus of commuters who chose to walk home filled sidewalks and bridges.

The quake knocked over walls, broke windows and set off scattered building fires. It toppled bookcases in homes and scattered goods on shop floors. It also cracked roads and broke water pipes, leaving homes without water.

Safety checks ordered at schools

A falling concrete wall knocked down and killed Rina Miyake as she walked at her elementary school in Takatsuki. NHK public television aired video showing the collapsed upper half of the high wall, which was painted cheerfully with trees, flowers and blue sky, and surrounded the school swimming pool.

Takatsuki Mayor Takeshi Hamada apologized over her death because of the wall's collapse. The structure was old and made of concrete blocks — a known risk in earthquakes. Chief Cabinet Secretary Yoshihide Suga ordered the Education Ministry to conduct nationwide safety checks of concrete block structures at public schools.

(CBC)

More than 1,000 schools were closed in Osaka and nearby prefectures, Kyodo News reported. Wall cracks and other minor damage were found at several schools.

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

Many homes and buildings, including a major hospital, were temporarily without power, though electricity was restored at most places by midafternoon.

Due to damage to underground gas lines, 110,000 homes in Takatsuki and Ibaraki cities were without gas, and repairs are expected to take as long as two weeks, according to Osaka Gas Co.

Earthquake evacuees rest in a shelter at an elementary school in Takatsuki. (Jiji Press/AFP/Getty Images)

More building damage was found in the afternoon as disaster and relief workers inspected and cleaned up the affected areas. Roofs and roof tiles at homes and at least one temple fell to the ground in Osaka. At a shrine in Kyoto, stone lanterns broke and collapsed to the ground.

Defence troops joined rescue and relief operations in parts of Osaka, along with special vehicles to deliver clean drinking water.

About 850 people took shelter at community centres, school gymnasiums and other public facilities in Osaka.

NTV showed shopkeepers at a vegetable store in Ibaraki city bursting out of the door at the initial temblor. At a liquor store, dozens of bottles of wine and other alcohol were scattered on the floor, many of them broken and their contents leaking out.

Schoolchildren take shelter outside in Ikeda, Osaka, following Monday's earthquake. A nine-year-old girl was killed at her school when a concrete wall fell on her. (Takaki Yajima/Kyodo News via AP)

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

"It was not as bad as the Kobe quake," said Jun Kawanami, a 30-year-old lawyer in Osaka.

Kawanami said his wife ducked under a table and elevators in his office building were out of operation.

"I used the stairs but I was out of breath by the time I arrived at my office on the 22nd floor," he said.