Clouds of black smoke poured from the Kashiwazaki nuclear plant
An earthquake has struck central Japan, killing at least seven people, flattening buildings and triggering a fire at a nuclear power plant.
Hundreds of people were injured when the 6.8-magnitude tremor struck the Niigata area.
The fire at the nuclear plant has been extinguished, and there was no release of radiation or damage to the reactors, officials said.
Prime Minister Shinzo Abe has flown to the affected region.
He cut short a trip to the south-western city of Nagasaki, where he was campaigning ahead of forthcoming upper house elections.
The seven deaths took place in the city of Kashiwazaki.
Four women and three men - all in their 70s and 80s - died from injuries sustained in the earthquake, the National Police Agency said.
City official Takashi Otsuka said about 2,000 people had been evacuated from their homes, while tens of thousands are reported to have no power or running water.
Older buildings, many of them with wooden walls and heavy tile roofs, appear to have suffered the most damage in the earthquake, which also cracked roads and buckled bridges.
The region has subsequently suffered several strong aftershocks.
Clouds of black smoke poured from the Kashiwazaki nuclear plant, which automatically shut down during the quake.
Motoyasu Tamaki, a Tokyo Electric Power Company official, said the fire had occurred in an electrical transformer.
Hospital officials said about 300 people had been brought in for treatment of injuries including broken bones, cuts and bruises, they added.
Masao Honma, a police officer in Kashiwazaki, described the moment the earthquake hit.
Japan is in one of the world's most seismically active areas
"It was too strong to stand," he told Reuters news agency. "Some people got under tables, others immediately went outside."
Resident Ritei Wakatsuki told the Associated Press news agency: "I was so scared - the violent shaking went on for 20 seconds. I almost fainted through fear of the shaking."
Skyscrapers swayed in Tokyo, more than 200km (125 miles), from the earthquake's epicentre in the Sea of Japan.
Earthquakes are common in Japan, which is situated in one of the world's most seismically active areas, and the country regularly holds safety drills.
Three years ago, an earthquake in the same area left 65 people dead.
In 1995, a magnitude 7.3 tremor hit the city of Kobe, killing more than 6,400 people.