Hagel made the remark during a news conference to outline the Obama administration's proposed defense budget, where he was asked whether the North Koreans are flirting with war.
"First, this country, the United States of America, our allies, United Nations, has been very clear that North Korea has been, with its bellicose rhetoric, with its actions, have been skating very close to a dangerous line," Hagel said. "Their actions and their words have not helped defuse a combustible situation.
"And it is, I believe, the -- certainly the intent and hope of all of our allies, certainly this country, that that rhetoric be ratcheted down, those actions be neutralized, and that's in the interest of all countries.
"Now, in the event that that does not occur, as we have said many times, our country is fully prepared to deal with any contingency, any action that North Korea may take or any provocation that they may instigate. And we have contingencies prepared to do that."
In response to a question at the same news conference, Gen. Martin Dempsey, the chairman of the Joint Chiefs of Staff, demurred when asked how close the United States thinks North Korea is to having capability of sending a nuclear warhead-tipped missile as far as Japan or further.
"Well, the proximity of the North Koreans to achieving a miniaturization of a nuclear device on a ballistic missile is really ... a classified matter," Dempsey said. "But they have conducted two nuclear tests. They have conducted several successful ballistic missile launches. And in the absence of concrete evidence to the contrary, we have to assume the worst case, and that's ... why we're postured as we are today."
'How to Train Your Dragon 2' releases 5-minute clip
Lytro unveils camera that can focus a photo after shooting it