An earthquake with a preliminary magnitude of 5.5 hit Kumamoto prefecture in southern Japan on Tuesday, broadcaster NHK said.