Thousands of revelers on the Charles River Esplanade danced and swayed to the music at the Hatch Memorial Shell, then marveled as red and blue fireworks lit up the night sky Wednesday, celebrating the country’s independence.
The annual July Fourth extravaganza, one of Boston’s most beloved traditions, was infused with patriotic cheer, from a singalong of American standards such as “My Country, ’Tis of Thee,” to a bravura performance of the “1812 Overture” by the Boston Pops Orchestra.
But the show also gave a nod to politics, with musical and spoken-word performances about immigration to the United States, including from singer and actress Rita Moreno, who recited words that adorn the Statue of Liberty: “Give me your tired, your poor, Your huddled masses yearning to breathe free, The wretched refuse of your teeming shore. Send these, the homeless, tempest-tost to me, I lift my lamp beside the golden door!”
On a simmering summer day, some visitors waited to make their way to the Esplanade until the evening. But for the most devoted fans, the wait was far longer but still well worth a prime viewing spot.
Susan Araujo, Darlene Hicks, and Jeri Juarez — three sisters from Arizona, Oklahoma, and California, respectively — had watched the July Fourth concert on TV for years. But this year, they wanted to be here in person.
They woke up at 4 a.m. to get front-row seats by the stage.
“It was beautiful and inspiring,” Juarez said as a flurry of fireworks went off in the distance.
Reisa Volkert, 66, of Boxborough, was among the first in line, waiting to claim her patch of grass.
“It’s a little harder for me to get a good spot at my age now, so if I want to do that, I need to be early,” she explained. Volkert has been an early arrival for Boston’s July 4 celebration since the bicentennial in 1976, missing only a few.
Despite the unrelenting heat Wednesday, celebration was in the air.
James Barnes, 49, of Brighton wore a plush red, white, and blue top hat, a T-shirt styled after Captain America’s costume, stars-and-stripes tights, and matching sneakers.
“I love coming here every year,” he said. “I love the festive times and the traditions.”
Barnes said he has come to the Esplanade’s July 4 celebration for about 15 years. He adopted eye-catching patriotic garb five years ago to “show the spirit of America,” he said.
After making their way through security, many people napped, resting hats on their faces to block the sun. Others read books, ate hot dogs, or played cards to pass the time. One woman brought a stack of printed Sudoku puzzles.
The vibe was peaceful. Before the fireworks began, State Police reported no major incidents.
The heat did take a toll. Boston EMS took at least three people to the hospital and helped 88 people at medical stations.
This Independence Day — the second since President Trump took office — took on decidedly political overtones.
Lindsay Chretien, 35, of Arlington wore a sign she had made that morning, attached to the back of her red and blue dress. It read, “Resistance is American.” She brought along some sign-making supplies in case she felt inspired again.
“For me right now, to be patriotic is to be protesting and be active,” said Chretien, who has recently participated in demonstrations against family separations at the Mexican border.
“It’s just not enough only to celebrate this year,” Chretien said. “Being American is about using your voice. I want people to be thinking about that.”
As East Boston resident Jennifer Martinelli, 42, reflected on the holiday’s meaning, she expressed mixed feelings about the nation’s history and some current government policies.
“I think our country has done and continues to do terrible things,” she said. “I think being American means being inclusive and kind. That’s the only type of American I want to be.”
On the Esplanade, six friends who had just graduated from high school in Burlington were decked out in elaborate red, white, and blue makeup and necklaces.
“I feel festive, more than I feel patriotic,” said Laura Prendergast, 18, who had painted little stars at the corners of her eyes. “I feel like this is a day to show that I still love this country, despite what is going on.”
And, at a marquee celebration for the state, there was Massachusetts pride, too.
“It’s very nice to have a city where people can come together and say what they believe,” said Jessie James, 18.
Leila Kiddu, 17, agreed.
“In Massachusetts, it seems like we have a better respect for each other’s differences than the rest of the country,” she said.
“We have lot of things to show that we are accepting.”
Minutes before the concert started at 8 p.m., a few dozen people stood in a large circle and volleyed a red, white, and blue beach ball back and forth.
Linda Deamicis of Quincy had started the game with a few of her family members.
“We started with four people,” she said. “And we got to 42.”
Deamicis, who has been coming to the fireworks for nearly a decade, said this was her family’s first Fourth of July without her brother, who recently passed away. Being able to share the evening with strangers made it all the more memorable.
“I don’t know any of these people,” Deamicis said. “Now, we’re all having fun and sharing a nice today together.”
“And we’re sweating together,” she added, laughing.
People of many races and ages had joined the circle, smiling and cheering as they raced to keep the ball from hitting the ground. Even those who had been accidentally hit by the ball ended up joining in, Deamicis said.
Johnny Poon from Newton said it was a lovely reminder of what the country is all about.
“As much as we’re divided, we’re all still equal,” he said. “We’re all America as a whole.”Globe correspondents Jeremy C. Fox, Sophia Eppolito, Marek Mazurek, Amelia Nierenberg, and Katie Camero, and Brian White of the Globe staff contributed to this report.