Tim Boyle/Getty Images/Thinkstock

Oil giant BP and the U.S. Environmental Protection Agency (EPA) have signed an agreement regarding legal procedures following the Deepwater Horizon oil spill in the Gulf of Mexico in 2010. The deal will lift the ban on the company doing business with the federal government, the EPA announced.

Meanwhile, BP will drop its legal action that was challenging the suspension of its operations. The ban effectively prevented the company from obtaining new contracts that could allow drilling operations in U.S. waters. The settlement comes into effect immediately and requires the oil company to improve its safety practices in line with the terms of the agreement that both parties drew up together, said Craig Hooks, assistant administrator for the EPA's Office of Administration and Resources Management.

RELATED: Enbridge gets approval for major pipeline reversal

Under the terms of the agreement BP is subject to independent audits that will evaluate its ethics compliance, safety and corporate governance for the next five years, the EPA said. In order to make sure it meets all the requirements in the settlement, the company will have to set up a separate governing body, responsible for ethics and compliance, as well as maintain a new code of conduct that will be used as guidance to employees in different situations. BP will also have to ensure that a whistleblowing culture is encouraged and workers who report violations are protected against all forms of harassment.