BEIJING  Defense Secretary Robert M. Gates warned Tuesday that North Korea was within five years of being able to strike the continental United States with an intercontinental ballistic missile, and said that, combined with its expanding nuclear program, the country “is becoming a direct threat to the United States.”

Mr. Gates is a former director of the C.I.A., and his statement, officials said, reflected both a new assessment by American intelligence officials and his own concern that Washington had consistently underestimated the pace at which the North was developing nuclear and missile technologies.

It is unclear how recent the new assessment may be, but Mr. Gates’ remarks, made just an hour after he met with Hu Jintao, China’s president, may have been partly intended to convince China that the Obama administration no longer regards the North as a concern only in the region. The administration has increasingly put pressure on China to try to persuade North Korea, a longtime China ally, to give up its nuclear weapons program.

“The Chinese are always talking about their ‘core interests’ and threats they may have to respond to,” said one American official deeply involved in North Korea strategy. “They needed to hear that we have a few, too.”