SEOUL—North Korea said Tuesday it will "totally freeze" relations with South Korea and pull out of a nonaggression pact with Seoul, marking the widest rift between the Koreas in two decades and raising pressing questions over the next moves by the regime in Pyongyang and its main ally, China.

In a late-evening announcement in Asia, North Korea further severed inter-Korean ties a day after Seoul penalized Pyongyang for allegedly torpedoing and sinking a South Korean ship. It also emerged Tuesday that the North told its troops...