NEW YORK (AP) — With backyard barbecues and fireworks thundering across night skies, Americans celebrated Independence Day by participating in time-honored traditions that express pride in their country’s 242nd birthday.

But this quintessential American holiday also was marked with a sense of a United States divided for some — evidenced by competing televised events in the nation’s capital.

From New York to California, July Fourth festivities were at times lively and lighthearted, with Macy’s July Fourth fireworks and Nathan’s Famous hot dog eating contest.

The day’s events also were stately and traditional, with parades lining streets across the country and the world’s oldest commissioned warship firing a 21-gun salute to mark the 242 years since the signing of the Declaration of Independence.

For some Western states, however, the holiday was a bit more muted as high wildfire danger forced communities to cancel fireworks displays.

OLDEST WARSHIP

The USS Constitution sailed in Boston Harbor and fired her guns again to mark Independence Day.

The world’s oldest commissioned warship still afloat left its berth at the Charlestown Navy Yard Wednesday morning. It glided through the harbor to mark 242 years since the signing of the Declaration of Independence.

The ship nicknamed “Old Ironsides” traveled to Fort Independence on Castle Island to fire a 21-gun salute. The ship’s commander saluted the crowds gathered there.

A Navy sailor on board recited the Declaration of Independence during the cruise.

An additional 17-gun salute was fired as the ship passed the U.S. Coast Guard Station on its way back to the Charlestown Navy Yard. The station is the former site of the shipyard where the vessel was built in 1797.

A HISTORIC PARADE

Crowds lined the streets in a Rhode Island town to see what’s billed as the nation’s oldest continuous Fourth of July celebration. Begun in 1785, the Bristol parade typically attracts about 100,000 people to the seaside town.

This year’s was a scorcher: Temperatures hovered near 90 degrees when the parade began late Wednesday morning, and some marchers were treated for heat exhaustion and taken off the route.

Many officials marched in the parade, including Democratic Gov. Gina Raimondo and the members of the state’s congressional delegation.

DUELINGCELEBRATIONS

The country’s longest-running live national July Fourth television tradition is PBS’ broadcast of music and fireworks from the U.S. Capitol’s West Lawn. But it faced new counterprogramming this year from the White House, which is hosting its own concert and view of the National Park Service’s fireworks show.

PBS’ “A Capitol Fourth” had the bigger stars, including The Beach Boys, Jimmy Buffett, Pentatonix, Chita Rivera, Luke Combs and The Temptations.

The entertainers on the 90-minute White House event airing on the Hallmark Channel included singer-songwriter Sara Evans, pianist Lola Astanova and two former “American Idol” finalists. Both shows included the fireworks display from the National Park Service.

NEW AMERICANS,DIVIDED AMERICA

This was the first Fourth of July that many people were able to call themselves U.S. citizens after participating in naturalization ceremonies across the country.

In New Hampshire, more than 100 people from 48 countries became U.S. citizens during a ceremony at the Strawbery Banke museum in Portsmouth as part of the museum’s annual “American Celebration.” A ceremony was also held aboard the USS New Jersey, where dozens of people from countries including Vietnam and Bangladesh were sworn in.

Across the U.S., the new citizens pledged allegiance to a country where some people lament that the ability to debate respectfully the toughest issues of the day seems hopelessly lost.

For Brad Messier, a chef in Portland, Maine, the holiday “seems to illustrate the glaring divides that we have.” He asked: “How much does going and seeing fireworks really bring people together?”

But in rural Shelby County, Alabama, retired truck driver Floyd Champion said he views these as the best of times in America.

“I love the holiday because it’s our independence,” he said.

HOT DOGEATING HISTORY

Defending champions Joey “Jaws” Chestnut and Miki Sudo held onto their titles at the Nathan’s Famous July Fourth hot dog eating contest. They each downed dozens of wieners and buns in front of thousands of spectators at the annual seaside affair at New York City’s Coney Island.

The 34-year-old Chestnut surpassed his previous record by 2 hot dogs, gobbling down 74 franks and buns in 10 minutes. He won the Mustard Belt and his 11th title.

Sudo held onto her title as the top woman’s competitor, chomping 37 franks and buns to take home the top prize for an unprecedented fifth consecutive year.

FIREWORKS ACCIDENTS

Two men died and five other people were injured after a large tree branch fell on spectators during a fireworks display in western Illinois late Tuesday. Rock Island County sheriff’s officials say dozens of people were sitting near the tree at the time.

In Maryland, a 21-year-old man was hospitalized with “catastrophic injuries” to both hands after setting off fireworks at a large outdoor party where several attendees brought illegal fireworks, according to investigators. They say the man’s injuries weren’t life-threatening.