Devecser , Hungary ( CNN ) -- The aluminum plant at the heart of the deadly toxic red sludge spill in Hungary will resume production at the end of the week , government officials said Wednesday . And the chief executive of the plant , who was arrested on Monday , has been released pending trial , his lawyer Janos Banati said . Zoltan Bakonyi , the chief executive of the MAL aluminum plant , was detained Monday , accused of public endangerment and harming the environment , authorities said . The announcement came on the same day officials said a ninth person had died from the toxic spill . The European Union said Wednesday the rescue phase of the operation has concluded . The main priority is now is cleaning up , said Laurent de Pierrefeu , an EU official on the ground at the scene of the spill . The red sludge leaked from a reservoir at the plant in Hungary and streamed through villages and into the Danube , Europe 's second largest river . The plant will be guarded by police and will be monitored by the government , the country 's disaster relief commissioner said at a news conference Wednesday . Workers in Hungary have been racing to build three emergency dams to stem an expected second toxic spill from the plant . Some 500,000 cubic meters of toxic red sludge is in the plant 's reservoir , whose wall shows signs of ruptures and cracks , said Gyorgi Tottos , a spokeswoman with Hungary 's emergency services department . Officials say it 's only a matter of time before the wall breaks and spews the sludge across the landscape , she said . The amount of sludge that remains in the reservoir is about half the amount that spilled out more than week ago , inundating three villages and leaving the landscape covered in red . Crews were also trying to remove a layer of liquid from the top of the sludge in the reservoir in order to make the mud less mobile if the wall breaks . The aluminum company said in a statement Saturday it was doing its utmost `` to avoid further damages and to reinforce the injured deposit . '' The company said it has performed extensive maintenance work and renovations in the past decade and had followed safety regulations . It has also established a relief fund for victims of the spill and was attempting to help in finding accommodations for residents who were evacuated . About 800 people had to leave the village of Kolontar , downstream from the reservoir , and hundreds of soldiers were ready to rescue inhabitants of a nearby village if the wall collapses . CNN 's Tommy Evans and James Partington contributed to this report .
NEW : The head of the company , who was arrested Monday , is released without trial . Two people have been killed by the toxic spill . Red water flows from the lake into villages and the Congo River .