President Donald Trump has vowed to “safeguard” America’s values from enemies within in a speech to celebrate the Fourth of July.

Mr Trump watched paratroopers float to the ground in a tribute to America, greeted his audience of front-line medical workers and others central in responding to the coronavirus pandemic and opened up on those who “slander” him and disrespect the country’s past.

“We are now in the process of defeating the radical left, the anarchists, the agitators, the looters, and the people who, in many instances, have absolutely no clue what they are doing,” he said.

“We will never allow an angry mob to tear down our statues, erase our history, indoctrinate our children.

“And we will defend, protect and preserve (the) American way of life, which began in 1492 when Columbus discovered America.”

Even as officials across the country pleaded with Americans to curb their enthusiasm for large Fourth of July crowds, Mr Trump enticed the masses with a “special evening” of tributes and fireworks staged with new US coronavirus infections on the rise.

Trump July 4
President Trump and first lady Melania Trump stand on the Truman Balcony of the White House as they watch a fireworks display (Patrick Semansky/AP)

But the crowds wandering the National Mall for the night’s air show and fireworks were strikingly thinner those the gathering for last year’s jammed celebration.

Many who showed up wore masks, unlike those seated close together for Mr Trump’s South Lawn event, and distancing was easy to do for those scattered across the sprawling space.

The president did not hesitate to use the country’s birthday as an occasion to assail segments of the country that do not support him.

Carrying on a theme he pounded on a day earlier against the backdrop of the Mount Rushmore monuments, he went after those who have torn down statues or think some of them, particularly those of Confederate figures, should be removed.

“Our past is not a burden to be cast away,” Mr Trump said.

In many parts of the country, authorities discouraged mass gatherings for the holiday after days that have seen Covid-19 cases grow at a rate not experienced even during the deadliest phase of the pandemic in the spring.

In New York, once the epicentre, people were urged to avoid crowds and Nathan’s Famous July Fourth hot dog eating contest happened at an undisclosed location without spectators on hand, in advance of the evening’s televised fireworks spectacular over the Empire State Building.

In Philadelphia, mask and glove-wearing descendants of the signers of the Declaration of Independence participated in a virtual tapping of the famed Liberty Bell on Independence Mall and people were asked to join from afar by clinking glasses, tapping pots or ringing bells.

Mr Trump’s endorsement of big gatherings at the National Mall and at Mount Rushmore came as many communities decided to scrap fireworks, parades and other holiday traditions in hopes of avoiding yet more surges in infection.