Both countries exchanged heated rhetoric in recent days about Pyongyang's advancing nuclear and missile programs, and an American aircraft supercarrier group was diverted to waters off the peninsula in a show of force.