Image copyright AP Image caption Europol holds data on offences and suspects involved in organised crime and terrorism

The UK will remain part of the EU's law enforcement body at least until Brexit happens, ministers have announced.

Last month the government was warned it risked losing vital intelligence unless it signed up to new powers for Europol.

Now Policing Minister Brandon Lewis has announced the government plans to opt into the new regulations which take effect in May next year.

Mr Lewis said: "The UK is leaving the EU but the reality of cross-border crime remains."

He added: "Europol provides a valuable service to the UK and opting in would enable us to maintain our current access to the agency, until we leave the EU, helping keep the people of Britain safe."

Europol, which is funded through the European Union, works to combat drug gangs, trafficking and terrorism.

'Temporary solution'

The UK has been a member since its creation in 1998. The European Parliament agreed in May to enhance the agency's mandate and improve the way it tackles cross-border crime and terrorism - but until now the UK was the only country not to have opted into the relevant agreement.

Last month the National Crime Agency's David Armond warned said an "immediate", "urgent" decision was needed.

The government said its decision to opt in was "without prejudice" to any negotiations over its future relationship with Europol when it leaves the EU.

The Scottish government, which had been urging Home Secretary Amber Rudd to sign up, welcomed the announcement.

But its cabinet secretary Michael Matheson added: "While we welcome this decision, it only provides a temporary solution and protects our participation in Europol only while we remain part of the EU."