Authorities in Dalian, Liaoning province, have ordered the immediate shutdown and swift relocation of a controversial chemical plant. The radical move came after tens of thousands of people took to the streets to protest about the threat of pollution. Vast crowds of protesters swarmed into People's Square in the heart of the city yesterday morning, calling for the closure of the Fujia Petrochemical Company plant, which has been under intense scrutiny after a typhoon last week came close to causing a toxic spill, according to pictures and postings online. Some scuffles broke out as demonstrators clashed with hundreds of riot police - some wearing full body armour - in front of the city's government headquarters, Xinhua reported on its English-language news wire. The city government held an emergency meeting at 4pm and an announcement was made shortly afterwards that the plant would be shut immediately and arrangements for it to be relocated made as soon as possible, Xinhua reported. The news agency said thousands of protesters took part, but online postings and local residents said hundreds of thousands of demonstrators were involved. A staff member at Noah's Ark Bar on the south side of the square said she had seen large and boisterous crowds gathering there throughout the day. 'When I first went out to look at the protest a little before 11am I'd say there were at least 50,000 people there,' she said. 'The protest grew even bigger after that.' The announcement followed failed attempts by local party secretary Tang Jun and Mayor Li Wancai to calm demonstrators with a promise to move the plant, which had been met by demands for a clear timetable, Xinhua reported. Independent political candidate and social commentator Li Chengpeng, said on his blog: 'Dalian has won, not because the officials won or public opinion won, but because maintaining stability necessitated the win.' Social networks, such as Weibo, the Chinese version of Twitter, were abuzz with comments and images of the protest, but searches for words like 'Dalian' or 'strolling' - a tacit reference to protests - were banned from the microblog yesterday. Twitter postings said some protesters were still gathering last night despite the relocation announcement. The Fujia plant produces paraxylene - known as 'PX' by locals - a toxic petrochemical used in a number of paints and plastics. It was almost engulfed by huge waves a week ago as Typhoon Muifa tore through the city. A protective seawall was breached by the storm in two places, prompting officials to act to prevent flooding from damaging 20 metal tanks containing toxic chemicals. At least 400 truckloads of rocks were needed to repair the dyke.