After 146 years and having entertained generations of Americans, the Ringling Bros. and Barnum and Bailey Circus gave its final performance Sunday night.

With cast and crew gathered together under the big top, and with dozens of retired and former circus performers in the audience, Ringmaster Jonathan Lee Iverson led a singalong of "Auld Lang Syne."

Sunday night's 7 p.m. performance was the last of three final shows at the Nassau County Coliseum in Uniondale, N.Y., about 30 miles east of New York City.

Ringling's parent company, Feld Entertainment, announced in January it would close the show, citing declining attendance and high operating costs. The circus had also fought a running battle with animal rights activists, who had claimed that forcing animals to perform and transporting them around the country amounted to abuse. The company removed its famous elephants from its shows in May 2016, but ticket sales continued to decline.

In the end, Feld executives said they knew the circus couldn't compete with iPhones, the internet, video games and massively branded and carefully marketed characters. Their other productions — Frozen on Ice, Marvel Live, Supercross, Monster Trucks, Disney on Ice — resonate better with younger generations.

"We all have to embrace change," Kenneth Feld told the Associated Press before the final show. "But there is a love for the circus that will never die. Our family has given a half century of life to something that would have ended 50 years ago."

"It's 146 years of tradition, older than American baseball," said David Gregg, a clown from Hollywood, Fla. "This was one of the last nomadic tribes running around the country."

Once a mainstay of entertainment in small towns and big cities across the country, Ringling had two touring circuses this season, one of which ended its run earlier this month in Providence, R.I. That show was the more traditional, three-ring circus, while the show that closed this weekend has a narrative storyline. Called "Out of This World," it was set in futuristic outer space, with Iverson narrating in his signature baritone.

Sunday night's finale, broadcast around the world on Facebook and YouTube, featured an extravaganza of big cats, motorcycle stunts, clowns performing death-defying tricks, ice skaters and Mongolian contortionists — and that was just the first half. The second half brought more aerialists, hoop divers, basketball players in unicycles and an act that the circus staff calls "The Fuzzies," featuring dogs, pigs, llamas and goats.

Then came the end, the rounds of applause, the thank-yous, and the bittersweet singalong.

"Ladies and gentlemen, keep the circus alive inside you," Iverson said.

And shortly before 9:30 p.m., The Greatest Show on Earth was no more.

The Associated Press contributed to this report.