A writer was released yesterday after 29 days in detention for publishing a book exposing government wrongdoing and the plight of migrants during the Sanmen Gorge Dam project in the 1950s. Xie Chaoping , 55, was granted bail pending trial, with restricted freedom of movement, yesterday after he came to 'a thorough understanding of his illegal business with sincere regrets', a spokesman for the Linwei district police station in Weinan , Shaanxi , told cnwest.com, an official news website under the Shaanxi provincial propaganda department. Accompanied by his wife and detention house police, Xie completed paperwork for bail in the afternoon, almost a month after plain-clothes officers took him from his rented apartment in Beijing on August 19. Xie and wife Li Qiong boarded a train back to Beijing last night. 'I am feeling all right,' Xie said, adding that he needed to give some thought before speaking to the media back in Beijing. The case has not been dropped yet, according to Xie's lawyer, Zhou Ze , a partner at the Beijing Wentian Law Firm, which champions journalists' rights on the mainland. Twenty thousand copies of Xie's book, Great Migration, were published in May as a supplement to a magazine based in Taiyuan , Shanxi . Xie spent three years interviewing victims of the Sanmen Gorge Dam project. Cnwest.com reported that because of 'a lack of evidence' the People's Procuratorate in Linwei yesterday overruled the arrest application filed on September 13. Weinan's Culture Inspection Team said it confiscated 8,352 copies of the book on June 27 and more than 6,000 in July as an 'illegal publication' on the grounds that the book came out before it was censored by the magazine's editorial committee. The police spokesman said Xie's detention had been extended to 30 days because Xie was implicated in cross-province crime. Li Wanming , president of the work union of the Weinan Migration Bureau in Shaanxi, who in 2006 tipped off Xie about government embezzlement and migrants' suffering, said only a small number of books was in the hands of migrants. Zhou met Xie three times during his detention in Weinan, the last time on Wednesday. He said Xie was upbeat about his situation but had tears in his eyes when talking about his family. 'The warders and inmates all respected him and didn't ask him to do any labour work,' Zhou said, but Xie did not like to be treated differently. Legal experts said Xie's release was a result of support and pressure from the media, public opinion and internet users. Zhou said the efforts of the media and other supportive scholars had paid off. Beijing-based lawyer Liu Xiaoyuan said it was a compromise forced by the media spotlight and the public. 'The case has nothing to do with 'illegal business', and it's an abuse of legal power,' Liu said, adding the case is likely to fade away when the bail expires in a year. Hao Jinsong , a Beijing-based legal scholar, said Xie's detention was a 'double-edge sword'. 'On the one hand, it might pose a threat to writers who work on similar projects,' Hao said. 'But on the other hand, it has alarmed others to better protect themselves and fend off legal risks in the process of working on similar literature.' He added that writers and reporters were responsible for keeping society updated on social problems. 'They serve as the skin of society that feels the pain and protects key organs,' Hao said. 'If the skin becomes numb, losing its ability to feel the pain, it's too late to heal the damage to key organs.' Hebei printing house project manager Zhao Shun , who helped Xie print his book, was detained last weekend and a number of other workers were interrogated by Weinan police.