An earthquake with a magnitude of 5.1 struck off the coast of Fukushima Prefecture on Friday, the Japan Meteorological Agency said, adding there was no danger of a tsunami.