WASHINGTON (AP) — The U.S. military is waiting for clarity from the Pentagon following President Donald Trump's back-and-forth on troop levels in Europe, upending the lives of military personnel and potentially costing taxpayers millions of dollars, two U.S. defense officials told The Associated Press.

NATO allies were bewildered in May when Trump said he would send 5,000 U.S. troops to Poland just weeks after ordering the same number pulled from Europe, following a spat with Germany's Chancellor Friedrich Merz over the Iran war. The Trump administration says troop reductions in Europe have long been planned and coordinated with allies.

WATCH: Germany builds up its military to prepare for a potential future without U.S. support

The Republican president announced on social media two weeks ago that he was sending troops to Poland — the same day the Pentagon had officially ordered the cancellation of a rotation of soldiers heading there, one of the defense officials said.

The unit's equipment was already on the way. Sending it cost the military $32 million, said U.S. Transportation Command, the military agency largely responsible for moving troops and gear across the globe.