President Donald Trump’s call this week for a separate U.S. “space force” was the culmination of months of frustration over what he felt was a lack of Pentagon action on his initial suggestions about the topic, according to people familiar with the decision.

The announcement on Monday—which surprised many military officials, senior aerospace industry executives and lawmakers—went against well-known opposition by Pentagon leaders to the idea of establishing a new branch of the U.S. armed forces.

The week before, Air Force Secretary Heather Wilson and the service’s senior commanders gathered for a strategy session in Dayton, Ohio, but none had an inkling about Mr. Trump’s impending announcement on Monday, according to one of these people, who attended the sessions.