SEOUL--A rare earthquake of magnitude 5.4 rattled South Korea on Wednesday, its second most powerful quake on record, shaking buildings but causing no major damage or injuries.

The quake struck about 9 kilometers north of the southeastern port city of Pohang, the Korea Meteorological Administration said in a news briefing.

Tremors were felt across the country but operations at nuclear reactors were not affected, the state-run nuclear operator Korea Hydro & Nuclear Power Co. said in a statement.

South Korea has relatively little seismic activity, compared with Japan to the east.

Its strongest quake on record was magnitude 5.8 in September last year.