WASHINGTON — North Korea announced on Wednesday that it would suspend its nuclear weapons tests and uranium enrichment and allow international inspectors to monitor activities at its main nuclear complex. The surprise announcement raised the possibility of ending a diplomatic impasse that has allowed the country’s nuclear program to continue for years without international oversight.

The Obama administration called the steps “important, if limited.” But the announcement seemed to signal that North Korea’s new leader, Kim Jong-un, is at least willing to consider a return to negotiations and to engage with the United States, which pledged in exchange to ship tons of food aid to the isolated, impoverished nation.

A freeze on nuclear activity, if it holds, could significantly ease anxieties over North Korea’s behavior at a time when the Obama administration, in an election year, is focused on halting Iran’s nuclear program and reducing the possibility that Israel could attack Iran. The last significant effort to negotiate a dismantling of North Korea’s nuclear weapons collapsed in the waning weeks of George W. Bush’s presidency more than three years ago.

The United States and other nations have been watching closely to see whether Mr. Kim’s rise to power late last year after the death of his father, Kim Jong-il, would result in a change in North Korean behavior. The signals have been mixed. Only days ago, Mr. Kim delivered a bellicose speech suggesting that he could resort to military actions against South Korea as he consolidated his power.