"Thank you for keeping America safe, strong, proud, mighty and free. God bless you, God bless our military and God bless America. Happy 4th of July," he said at the celebration picnic with First Lady Melania standing next to him.
He said the US liberty had been "earned through the blood, sweat and sacrifice of American patriots" who had fought in the fields of Gettysburg, the sands of Iojima and the mountains of Afghanistan.
In June, Donald Trump announced he had ordered the Pentagon to create a Space Force as the sixth, "separate but equal" branch of the US military, adding that "space is a warfighting domain." He said the move opened a new chapter in the competition to explore space, with the goal of besting nations such as Russia and China.
However, it reportedly remains unclear how Trump's order will affect a 1967 treaty signed by more than 100 nations, including the United States, former Soviet Union and China, banning the militarization of space.