The European Union has reached a preliminary agreement on new rules to guarantee the safety of offshore drilling for oil and natural gas, an Irish official said Thursday.

The new legislation was drawn up in response to the 2010 oil spill in the
Gulf of Mexico .

Ireland was negotiating with the EU parliament on behalf of EU governments as it holds the EU presidency until June.

The legislation, which still needs formal backing from the two branches, lays out common rules on safety and liability in case of accidents for offshore drillings.