OITA, Japan - An earthquake with a preliminary magnitude of 5.0 shook Oita Prefecture and surrounding areas in southwestern Japan late Monday, the Japan Meteorological Agency said.