Hundreds of thousands of Americans were gathering on the sprawling National Mall in the center of Washington for concerts, fireworks and an address by the president.
Crowds were growing despite stifling heat in the afternoon outside the 97-year-old Lincoln Memorial, a symbol of national unity. A short cloudburst doused and cooled the spectators.
Flights were to be suspended at nearby Reagan National Airport from 6:15 to 7:45 p.m. ET (2215 to 2345 GMT) and then again for the later festivities.
President Donald Trump gave a speech from the Lincoln Memorial, with a display of tanks and military jets roaring over Washington in what critics deride as a taxpayer-funded exercise in glorifying himself.
Trump praised the military and urged young people to join the armed forces.
"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.
He spoke positively about the military, and with well-planned choreography, told stories about each branch to introduce separate military aircraft flying over the site.
Trump's decision to make an address and turn the event into a celebration of the U.S. military has angered his opponents and upset local Washington officials, accustomed to arranging July 4th events without political interference.
Surrounded by the top officers of the Pentagon, and a panoply of invited Republican officials and VIP donors, the event allowed Trump to stake a strong claim to patriotic fervor 16 months ahead of a presidential election with polls showing his potential Democratic rivals holding a significant edge over him.
Trump originally wanted a grand military parade for the holiday, ostensibly inspired by France's rollout of its military might on its own national day.
But instead, he got a scaled-back version, with some U.S. armored vehicles parked for display and a flyover by the president's own Air Force One jet, the B2 bomber, attack helicopters, and the Navy's Blue Angels flying team.
It was a military show that has been absent from the U.S. capital for decades, and Trump's foes blasted it ahead of time as a show of militarism.
"What, I wonder, will Donald Trump say this evening when he speaks to the nation at an event designed more to stroke his ego than celebrate American ideals?" said leading Democratic White House contender Joe Biden in a speech in Iowa earlier Thursday.
Millions of dollars, worries about crowds
Earlier in the day, thousands of supporters wearing Trump's signature "Make America Great Again" hats, along with opponents questioning the cost of the event, poured into the U.S. capital despite scorching temperatures and intermittent rain, while a diapered "Baby Trump" balloon sat next to a banner calling Trump a traitor.
Two protesters were arrested outside the White House for "burning an American flag outside the limits of a permit that had been issued by the National Park Service," according to the U.S. Secret Service.
Ahead of the speech, Democrats accused the president of staging an out-of-place campaign rally, aware he has a history of veering off script with sharp partisan attacks even at events that are not meant to be overtly political.
Trump supporters and opponents carried American flags and wore red, white and blue outfits.
"I think what Trump's doing with the tanks, all the flyovers, I think it's great," said Brandon Lawrence, his face painted with the colors of the American flag.
Some at the White House had worried about the crowd size, according to an administration official.
In January 2017, Trump fumed about reports that the crowd at his inauguration ceremony in front of the Capitol was smaller than it was for President Barack Obama.
Perhaps with the crowd size in mind, Trump sent out tweets urging people to attend and saying the event would be "one of the biggest celebrations in the history of our Country." As it happened, the crowd lined both sides of the reflecting pool in front of the memorial, and Trump later called it a "great crowd."
Opponents were not impressed.
"This is costing us millions and millions of dollars. We the taxpayers are paying for it, for Donald Trump to use our military as a prop. And that’s just not right," said Medea Benjamin, co-founder of the women-led peace group Code Pink, before the event.
Republican political groups were given prime tickets for Trump's speech, and the Washington Post reported that the U.S. National Park Service diverted 2.5 million U.S. dollars in park entrance fees to help pay for the event.
Democratic presidential candidate Senator Bernie Sanders weighed in with criticism: "This is what authoritarians do: @realDonaldTrump is taking 2.5 million U.S. dollars away from our National Park Service to glorify himself with a spectacle of military tanks rolling through Washington," he wrote in a tweet.
Former Vice President Joe Biden, leading in opinion polls in the race for the 2020 Democratic presidential nomination, said in Iowa: "Donald Trump, I believe, is incapable of celebrating what makes America great, because I don't think he gets it."
Trump played down the expense.
"The cost of our great Salute to America tomorrow will be very little compared to what it is worth. We own the planes, we have the pilots, the airport is right next door (Andrews), all we need is the fuel,” he posted on Twitter on Wednesday. "We own the tanks and all. Fireworks are donated by two of the greats. Nice!” Andrews is the name of a nearby military base.
The July 4th holiday celebrates the U.S. founders' declaring independence from Britain in 1776.
(With input from AFP, Reuters, and Xinhua)