Updated

South Korea's Cabinet on Tuesday approved a military intelligence-sharing agreement with Japan to better deal with threats from North Korea, officials said, despite the North's warning the deal would only deepen regional animosities.

The approval of the pact, which takes effect after its formal signing later this week, also drew immediate criticism from South Korean opposition lawmakers who view it as an attempt to divert attention from a huge political scandal involving President Park Geun-hye.

Seoul officials said the deal has nothing to with the scandal and that information from Japanese satellites and other high-tech systems are necessary to thoroughly monitor developments in the North's weapons programs.

Worries about North Korea's weapons programs have grown since September when the country carried out its fifth nuclear test, and its most powerful to date.

Military cooperation with Japan is still a divisive issue in South Korea, where many people still harbor strong resentment against Japan's brutal 1910-1945 colonial rule of the Korean Peninsula. In 2012, Seoul and Tokyo nearly signed the pact but South Korea backed off at the last minute following a public backlash.

The North's official Korean Central News Agency issued a commentary on Tuesday accusing Washington of pushing its two Asian allies to sign the intelligence deal to bolster its anti-Pyongyang, regional hegemony.

The pact "will further the danger of a nuclear war on the Korean Peninsula and poses a grave threat to peace and security in northeast Asia and the world," the commentary said.

North Korea also issues such rhetoric when Washington and Seoul stage military drills or move to bolster their military cooperation.

Main opposition parties in South Korea have threatened to impeach Park over the scandal. On Sunday, prosecutors directly linked Park to alleged misdeeds by her shadowy confidante charged with pressuring companies to donate money to foundations controlled by her.

The Korean Peninsula was divided into a U.S.-backed South Korea and a Soviet-supported, socialist North Korea at the end of the Japanese occupation. The two Koreas fought a three-year war in the early 1950s that ended with an armistice, not a peace treaty.