SYDNEY, Australia — The American defense secretary , Mark T. Esper, said Saturday that he was in favor of deploying ground-based missiles to Asia, a day after the United States formally pulled out of a Cold War-era arms treaty that directly limited such weapons.

Mr. Esper, speaking to reporters on his way to Australia, said he would like to see the deployment within “months” but did not specify an exact timeline, the types of weapons the United States would deploy and where exactly they would be positioned.

“These things tend to take longer than you expect,” Mr. Esper said.

Such a move would be likely to anger China and North Korea, two countries that have long opposed the deployment of American military hardware anywhere near their borders, and would most likely prompt further consternation from allies that Washington was veering dangerously close to starting a new arms race.

In 2018, the United States announced it would withdraw from the 1987 Intermediate-Range Nuclear Forces agreement, known as the I.N.F. treaty, after accusations that Russia had long dodged the treaty by repeatedly deploying nuclear-capable, medium-range missiles that could travel within the agreement’s prohibited range.