Trump, a Republican who was inspired to hold the flashy event after seeing a similar display in France, dismissed concerns ahead of the ceremony about the expense and militaristic overtones of the event outside the 97-year-old Lincoln Memorial, a symbol of national unity.
"Our nation is stronger today than it ever was before. It is its strongest now," Trump said from a platform in front of the famous memorial, echoing a theme he uses at campaign rallies.
Flanked by Bradley fighting vehicles, Trump steered clear of divisive political rhetoric, in a departure from the majority of his speeches. At times, an enthusiastic crowd could be heard chanting: "USA! USA! USA!"
Trump, 73, praised American military might despite having himself avoided the draft during the Vietnam War with bone spurs in his feet. With well-planned choreography, he told stories about each branch to introduce separate fly-overs of military aircraft.
"For over 65 years, no enemy Air Force has managed to kill a single American soldier. Because the skies belong to the United States of America," he said.
Separately Trump paid tribute to the US Border Patrol and US Immigration and Customs Enforcement, two agencies that have played leading roles in carrying out his tough immigration policies.
He cited as great Americans both Harriet Tubman and Frederick Douglass, African-Americans who campaigned for the abolition of slavery. His praise was likely to draw fresh criticism as Trump's administration in May decided to keep Tubman’s image off the $20 bill. He previously raised doubts about his knowledge of Douglass by speaking of the former slave in the present tense as ”somebody who’s done an amazing job.”
The speech was followed by a concert on the US Capitol lawn at the opposite end of the National Mall. Fireworks would follow the concert, weather permitting.
Thousands of supporters wearing Trump's signature "Make America Great Again" hats, along with opponents questioning the cost of the event, poured into the US capital despite scorching temperatures and intermittent rain, while a diapered "Baby Trump" balloon sat next to a banner calling Trump a traitor.
Trump's speech divides
Jan Shairrick and two friends drove more than 1600km from southern Arkansas to join President Donald Trump's "Salute to America" Independence Day celebrations in Washington.
Trump has injected himself into this year's Fourth of July celebrations by planning a speech in front of the Lincoln Memorial and organising a show of military power that includes a display of tanks and a flyover of fighter jets.
Critics accused Trump of hijacking and politicising a traditionally nonpartisan holiday. Supporters said he was merely showing love for the country and its military.
"It's just a celebration of America," said Shairrick, sporting a "Trump 2020" baseball cap, a reference to the presidential election in November next year.
They said they saw no reason to protest Trump's plans for this year's event.
"The military protects us," said one friend, Debra Dickson, who has several family members in the military.
Just a mile east, residents of the Capitol Hill neighborhood had their own, much smaller parade on Thursday morning and many said they would not attend the "Salute to America" because they felt the July 4 celebrations had been taken over by Trump.
"This year we're not going," said Irina, a resident who said she usually takes her two young children to the concert by the US Capitol and watches the fireworks display over the National Mall.
"This is the holiday that unites all Americans but it seems that's not what is happening today unfortunately," she said, declining to give her last name.
'BABY TRUMP'
Code Pink, an organisation that says it works to end US wars and militarism, filled up a large diapered "Baby Trump" balloon on the National Mall in protest.
Medea Benjamin, a protester with the group, said the presence of tanks on the street scared her. "Where are we going as a nation? I don’t like it at all."
Along the July 4th parade route, where vendors sold bright-red "Make America Great Again" hats, many had no such concerns.
Susan DeGraff from Hockessin, Delaware, said she liked Trump's involvement in the celebrations. "He's absolutely not politicizing the event," she said. "He's the president!"
Schoolteacher Tiffany O'Brien traveled from Deerfield Beach, Florida just for the celebrations. "I think he loves the country and he wants everyone else to love it as well."
The July 4 holiday, which celebrates the anniversary of the US founders declaring independence from Britain in 1776, has by tradition not been a day when the president takes center stage.
The last time a US president spoke during celebrations in the capital was in 1951 when Harry Truman celebrated the 175th anniversary of the signing of the Declaration of Independence.
In a series of tweets this week, Trump said the event on Thursday would be "the show of a lifetime" and that "perhaps even Air Force One will do a low & loud sprint over the crowd." Air Force One is the presidential plane.