Britney Spears wrapped up her long-term, Las Vegas residency and some of her final concert aired on ABC as part of "Dick Clark's New Year's Rockin' Eve" with Ryan Seacrest.

"I just want to say thank you to the #PieceOfMe cast and crew, the city of Las Vegas, and all of the fans who came out to sing, dance and party!! What an incredible four years!! Love you all!!" the pop music icon tweeted Sunday evening.

"Tonight is the night! Saying goodbye both to Vegas and 2017! It's bittersweet, but I'm looking forward to an amazing 2018!!" read an earlier Twitter post from the singer.

Spears, 36, performed her hits "Work Bitch" and "Toxic" during the holiday broadcast, People magazine said.

Among the artists who took the stage in New York's Times Square -- where most of the New Year's Rockin' Eve special was filmed -- were Mariah Carey, Camila Cabello, Nick Jonas and Sugarland.