SEOUL, South Korea  Tens of thousands of protesters held a peaceful, almost festive, rally in Seoul, South Korea, on Sunday to protest the Group of 20 summit meeting that begins here on Thursday.

Organizers said that 40,000 union members, social activists and students turned out for the rally, but police officials put the number at half that, the local news media reported.

The main gathering broke up just after nightfall, although a few thousand union members stayed behind for a candlelight sit-in and a stare-down with the police, thousands of whom were present in armored riot gear. A temporary security law put in place just for the summit meeting prohibits marches after sunset, and the police used pepper spray to disperse some of the demonstrators.

“This happens every time, it’s stupid,” Kim Bo-ran, 26, said about the heavy security. “We’re peaceful. And look at the police, they all have new uniforms and new batons.”