A 7.3-magnitude quake has struck off Japan's eastern coast, triggering a small tsunami and sparking evacuations.
A one-metre wave hit Ishinomaki in Miyagi Prefecture and many people heeded calls to move to higher ground before all alerts were later lifted.
The quake epicentre was about 245km (150 miles) south-east of Kamiashi at a depth of about 36km, the US Geological Survey (USGS) said.
Miyagi was hit by a devastating earthquake and tsunami in March 2011.
The US-based Pacific Tsunami Warning Center had said there was no threat to the wider Pacific Ocean but had warned a local tsunami could be destructive for local coastlines.
There have been no reports of deaths, injuries or serious damage, and all tsunami warnings were cancelled at 19:20 local time (10:20 GMT), broadcaster NHK said.
Warnings of the tsunami height had varied between 50cm and 2m.
The BBC's Rupert Wingfield-Hayes in Tokyo says any such height would represent a far lower risk of devastation than the tsunami of up to 11 metres that struck in 2011 but that, since then, the country has clearly become jittery about any shaking of the earth.
The tsunami warnings had extended from the top of the main island of Honshu down towards Tokyo and evacuations were ordered from some of the affected areas.
With Japan's early warning system, NHK was able to break off its regular programming and issue an alert about the earthquake shortly before it struck.
A presenter on state broadcaster NHK then told viewers: "Remember last year's quake and tsunami. Call on your neighbours and flee to higher ground now!"
Buildings swayed violently in Tokyo.
Prime Minister Yoshihiko Noda cancelled campaigning for the 16 December election to return to his office.
Communications to Miyagi have proven difficult, with the high volume of telephone calls. Trains in the prefecture were halted and the runway at Sendai airport closed.
English teacher John Heritage, who is in Tagajo in Miyagi Prefecture, told the BBC the earthquake was not as powerful as some he had experienced but was worrying as it went on so long.
He said: "The students were kind of worried. Normally they're pretty calm, but they looked concerned. Then the tsunami alarm started going off and we evacuated to higher ground."
Jamie El-Banna, founder of It's Not Just Mud - a volunteer disaster relief organisation - said he joined the evacuation in Ishinomaki.
He told the BBC: "We live less than a kilometre from the water so we went calmly as far back from the water as possible, which is what the advice is if you can't get to higher ground. Everyone evacuated in a calm, orderly way."
Other people reported being alerted to the earthquake prior to its arrival by Japan's mobile phone-based warning system.
One tweeted that he was given 10 seconds and was able to slow his car before the shaking struck.
The USGS reported at least six aftershocks, the strongest of which was 6.2 in magnitude.
The 9.0 magnitude quake that struck on 11 March 2011 caused a devastating tsunami and left more than 15,000 people dead, with more than 3,200 missing.
That quake triggered a meltdown of fuel rods at the Fukushima nuclear plant, causing radiation leaks and mass evacuations.
The plant's operator, Tokyo Electric Power, told Agence France-Presse there were no reports of problems there this time, although workers had moved to higher ground.