MIAMI — A recent anti-satellite test by India serves as an example of why the U.S. is working to create a stand-alone Space Force that will focus on military needs in that domain, according to the head of the Pentagon.

In his first statement regarding the test, acting Defense Secretary Patrick Shanahan declined to comment on whether the U.S. ally should have launched the test, while warning other nations who may consider such actions against creating more space debris.

“We all live in space. Let’s not make it a mess,” he said while en route to a meeting at U.S. Southern Command. “Space should be a place where we can conduct business, space should be a place where people have freedom to operate. We cannot make it unstable, we cannot create a debris problem that ASAT tests create. So, thoughtfulness goes a long way.

“Not having rules and engagement is worrisome, so how people test and develop technology is important, but how we share this critical domain — I would expect anyone who tests does not put at risk anyone else’s assets. There are certain basic principles.”

Shanahan pointed to India’s missile launch as why an American Space Force “is so important.”

"We talk about space being a contested domain. It’s a good example of how many changes are taking place in that environment,” he said, adding that the Indians “probably aren’t the only people who have that kind of capability.”

Asked twice whether the Pentagon was given prior notice of the test by India, the acting secretary did not directly comment. He did say he has not had any discussions with Pakistani officials in the wake of the test.

Wednesday morning, Indian Prime Minister Narendra Modi announced in a broadcast that Indian scientists had destroyed a low-Earth orbit satellite with a missile, demonstrating India’s capacity as a “space power” alongside the U.S., Russia and China.

In a government statement following the launch, Modi’s government wrote that the “test was done in the lower atmosphere to ensure that there is no space debris. Whatever debris that is generated will decay and fall back onto the Earth within weeks.”

“India has no intention of entering into an arms race in outer space,” the statement adds. “We have always maintained that space must be used only for peaceful purposes. We are against the weaponization of outer space and support international efforts to reinforce the safety and security of space-based assets.”

The Associated Press contributed to this report.