London (CNN) Britain can unilaterally halt the formal process of leaving the European Union, the bloc's top court said Monday.

The European Court of Justice sided with the advice of its top legal officer, who declared last week that the UK has the power to withdraw its notification to leave the EU under Article 50 of the Lisbon Treaty without the agreement of other member states.

The UK can withdraw its Article 50 notification before the withdrawal agreement negotiated by the UK and the EU comes into force, the ECJ said. "The United Kingdom is free to revoke unilaterally the notification of its intention to withdraw from the EU," the court ruled.

#ECJ: UK is free to unilaterally revoke the notification of its intention to withdraw from the EU -- Case C-621/18 Wightman #Brexit pic.twitter.com/KUOI2eQ48C — EU Court of Justice (@EUCourtPress) December 10, 2018

Crucially, the UK would be able to retain its current agreements with the EU, which include a rebate on financial contributions, an opt-out to the Schengen open-border zone and non-membership of the Euro.

"Such a revocation, decided in accordance with its own national constitutional requirements, would have the effect that the United Kingdom remains in the EU under terms that are unchanged as regards its status as a Member State," the court said.

Read More