President Donald Trump on Wednesday praised the U.S. military for keeping America "safe, strong, proud, mighty and free" and used the Independence Day holiday to thank them for being willing to put their lives on the line in defense of the nation.

"Two hundred and 42 years ago on July 4, 1776, America's founders adopted the Declaration of independence and changed the course of human history," said Trump, addressing hundreds of military families attending a White House picnic from a balcony overlooking the South Lawn of the White House.

"But our freedom exists only because there are brave Americans willing to give their lives, to defend it and defend our great country," added Trump, who was accompanied by his wife, Melania. "America's liberty has been earned through the blood, sweat and sacrifice of American patriots."

Trump and the first lady later returned to the balcony toward the end of a nationally televised concert from the South Lawn and stayed for the annual fireworks show on the National Mall. Trump pumped both fists several times at the end of the show before he went back inside the White House.

Trump was not expected on Wednesday to interview candidates for the Supreme Court, taking a holiday respite from the intense process. He has spoken with seven candidates, according to the White House, and will announce his choice for a successor to retiring Justice Anthony Kennedy on Monday.

Before greeting guests on the lawn during the picnic, Trump praised service members and their families as "truly unbelievable people."

"Thank you for keeping America safe, strong, proud, mighty and free," he said.

The White House invited some 1,500 military families to the picnic, according to the first lady's office, with 5,500 more invited for the fireworks. Several Cabinet secretaries attended the picnic, including embattled Environmental Protection Agency Administrator Scott Pruitt.

Entertainers appearing at the 90-minute concert that was televised by the Hallmark Channel included singer-songwriter Sara Evans, pianist Lola Astanova and former "American Idol" finalists Jonny Brenns and Jax.

