A powerful magnitude 5.9 earthquake has shaken the Tokyo area, slightly injuring at least 12 people and halting trains and subways.

Officials said there was no major damage or danger of a tsunami.

The Meteorological Agency said the quake was centred in Chiba prefecture, just east of Tokyo, at a depth of 80 kilometres (48 miles).

It caused buildings to sway but there were no immediate reports of damage or injuries.

Chief cabinet secretary Hirokazu Matsuno said there were no abnormalities at nuclear power facilities in the area.

Chiba prefectural police said two women in separate locations sprained their ankles when they were thrown to the floor during the quake.

NHK public television said a commuter train partially derailed when it made an emergency stop, causing three passengers to fall, suffering slight injuries.

Seven others were injured in Kanagawa prefecture, near Tokyo, according to media reports.

Tokyo Electric Power Company Holdings said about 250 homes in central Tokyo temporarily lost power.

"Shinkansen" super express trains in and out of Tokyo were halted for safety checks but later resumed operation, East Japan Railway Company said.

Tokyo's Yamanote loop line and subways also restarted.

Outside of Tokyo's Shinagawa station, where local trains were temporarily halted, there was a long line of people trying to get taxis home.

Many lifts automatically stopped, including those at Tokyo's metropolitan government building, temporarily trapping some people.

Fire and disaster officials said underground water pipes were damaged in dozens of locations in Tokyo.

In one district, water was gushing from the ground.

New Prime Minister Fumio Kishida posted a message on Twitter urging people to "check the latest information and take action to protect your lives".

Mr Kishida returned to his office late on Thursday to lead the government's response.