Demonstrators demanded officials working in the ministries stop serving what protesters called the vested interests of the Pheu Thai Party-led government, the Bangkok Post reported.
The rallies protested enforcement of the Internal Security Act throughout Bangkok and Nonthaburi plus a district in Pathum Thani and another district in Samut Prakan. The new security order would allow authorities to impose curfews, and set up checkpoints and restrict the movement of demonstrators.
An estimated 3,000 protesters rallied outside the 10 ministries, while 17,000 more protested at the Department of Special Investigations headquarters adjacent to the government complex, police said.
Protest organizer Suthep Thaugsuban led a march from the Finance Ministry to the DSI, forcing officials to evacuate the building, the Post reported. Police said they were seeking warrants for his and others' arrests.
Rallies also were conducted in other provinces, mainly in the south.
Prime Minister Yingluck Shinawatra called a meeting of permanent ministry secretaries to discuss how they could work in light of the protests blocking entry to their offices.
The prime minister said the government would not use force to disperse the protesters.
"The implementing of the International Security Act in Bangkok and nearby provinces is aimed at preventing state agencies from being laid siege to and to allow state officials to do their jobs," Yingluck said. "The imposition of this special law is not intended to harm anyone, because the government will not use violent means to deal with the protesters."