British Prime Minister Theresa May on Friday struck a last-minute deal with the European Union to move the Brexit talks forward, BBC reported. The European Union had set a deadline of December 10 for May to come up with terms for Brexit.

According to the terms of the deal, Britain would pay a substantial “divorce bill” to the European Union, CNN reported. The rights of European Union citizens in the United Kingdom and vice-versa would be protected. There will also be no “hard border” in Northern Ireland between the United Kingdom and European Union countries. This will leave the Republic of Ireland in the European Union.

“Today’s result is of course a compromise,” European Commission President Jean-Claude Juncker said after the deal, according to BBC. “Negotiations had been difficult for both the UK and the European Union.” May said the deal “required give and take from both sides”, but that it would guarantee the rights of 30 lakh European Union citizens living in the UK.

Talks for a new trade deal are now likely to begin. Britain will leave the European Union in March 2019.