Three people were killed after a magnitude 6.1 earthquake shook Japan's second-biggest city Osaka early this morning.

The quake caused walls to collapse, water mains to burst and halted factory lines in a key industrial area, but no tsunami warning was issued.

Japanese Prime Minister Shinzo Abe said authorities were assessing damage and that its top priority was the safety of residents.

Japanese media including public broadcaster NHK said collapsing walls had killed an 80-year-old man and a nine-year-old girl, and that another man in his 80s was killed after being crushed by a toppling bookcase.

The government confirmed two of the deaths.

Live footage showed burst water mains and a house on fire after the quake hit just before 8am.

The epicentre of the earthquake was just north of Osaka city, said the Japan Meteorological Agency, which originally put the magnitude at 5.9 but later raised it to 6.1.

The quake struck an important industrial area of central Japan. Osaka-based Panasonic said it was halting production at two of its plants - one that produces lighting devices and another for projectors.

Daihatsu, a unit of the Toyota group, said it had suspended production at its factories in Osaka and Kyoto while it checked for damage.   

Osaka prefecture, which includes the city and surrounding areas, has a population of 8.8 million.

No irregularities were detected at the Mihama, Takahama and Ohi nuclear plants to the north of Osaka, Kansai Electric Power said.

More than 170,000 households in Osaka and neighbouring Hyogo prefecture lost power temporarily but it was restored within two hours, the utility said.

Sharp said its directly owned plants in the area were operating as usual, but a joint venture plant with parent Hon Hai Precision Industry said it had halted operations for safety checks.

Honda said production in Suzuka, in nearby Mie prefecture, was halted for checks but no problems were found and operations were back to normal.

A massive magnitude 9.0 quake hit northeastern Japan on 11 March 2011, triggering a huge tsunami that killed some 18,000 people and triggered the world's worst nuclear disaster in a quarter of a century at Tokyo Electric Power's Fukushima Daiichi nuclear plant.