CHICAGO — With cakes, singalongs and hashtags, some of Cook County State's Attorney Anita Alvarez's biggest critics celebrated Kim Foxx's win — and Alvarez's loss — at parties and on social media Tuesday night.

In the wake of her handling of the Laquan McDonald case, in which it took more than a year for her office to charge Officer Jason Van Dyke for shooting the black teenager 16 times, Alvarez lost her bid for re-election by a wide margin to Foxx on Tuesday night.

Protesters who had been fighting for an Alvarez ouster for months celebrated her loss at the polls Tuesday, but warned Foxx that they will be watching her as well.

In front of a crowd of hundreds at the Holiday Inn Chicago Mart Plaza in River North, Foxx said that the race was about "turning the page."

Anti-Alvarez activists — who weighed in on social media and at parties across the city — thought so, too.

In a Facebook video, a group of friends raised their glasses at a Chicago house party, singing, "Bye Anita, Bye Anita, Hey, Hey, Hey, Goodbye."

#alvarezisgone We sang, we danced, we cried, we hashtagged. Posted by Diana Parker on Tuesday, March 15, 2016

In a statement, activist group Assata’s Daughters said Chicago's black youths kicked Alvarez out of office. They made a cake to celebrate the occasion, too.

"Just a month ago, Anita Alvarez was winning in the polls. Communities who refuse to be killed, jailed, and abused without any chance at justice refused to allow her to be re-elected as State’s Attorney," the group said in a statement. “We did this for Rekia… We did this for Laquan... We won’t stop until we’re free and Kim Foxx should know that as well."

At Foxx's celebration, Black Lives Matter activist Ja'Mal Green and Jared Steverson sported "Adios Anita" tees and hugged an uncle of Laquan, the teen who was shot and killed by a Chicago police officer in 2014. The youths shared the stage with former Illinois Gov. Pat Quinn, former Illinois Senate President Emil Jones and other politicians.

"We got her out of here," Green said an hour before Alvarez conceded. "We can call it."

Alvarez's re-election bid was widely seen as a referendum on her handling of alleged cases of police misconduct, including the Laquan case, in which she took 13 months before charging the Chicago Police officer who shot Laquan 16 times. Critics started a Twitter hashtag — #byeanita — and demanded she step down.

Brian Payne, a Foxx backer from Roseland, said he voted for Alvarez in the last election. But this time was different, he said at the campaign party Tuesday.

"This is a referendum," he said. "She didn't hold [bad cops] accountable. If you do something, or I do something bad, we are automatically held accountable. You cannot say it takes 400 days to hold a police officer accountable."

The #byeanita hashtag took off on Twitter Tuesday night.

Kim Foxx defeated Anita Alvarez in the Cook County state's attorney's race Tuesday. View Full Caption Facebook/Getty Images

Supporters of Foxx, a close ally of Cook County President Toni Preckwinkle, swayed to "Rhythm of the Night" at the election celebration.

"The gulf between law enforcement and our community must be bridged," Foxx told supporters. "We all have the same and common goal, which is public safety. The work we have to do is going to take an all hands on deck approach."

In creating change, Foxx said that she would seek input from Chicago's communities, faith-based leaders and "the young people who have shown up" and demanded justice.

While excited about her recent win, Foxx told the crowd that there's a lot of work ahead for the office.

"Tonight ... let this girl from Cabrini absorb this," she said.

Foxx still must win the general election in November against Republican Christopher E.K. Pfannkuche, a longtime prosecutor.

For more neighborhood news, listen to DNAinfo Radio here: