Two years have passed since the UK voted to leave the European Union on 23 June 2016, and there are still 279 days to go until the official date of Brexit on 29 March 2019.

But it won't all be over then. The process of Britain leaving the EU is due to roll out over many years to come, with plenty of uncertainties along the way.

So what happens next?

2018

28-29 June

EU leaders meet for a European Council summit in Brussels. The Irish Government and European Commission have made clear they would like agreement here on the "backstop" arrangement to regulate the border with Northern Ireland in the absence of a viable alternative proposal from the UK.

However, Britain will try to delay the decision. Theresa May told MPs last week that the summit was "not about the Brexit negotiations".

Leaders of the EU27 will meet chief negotiator Michel Barnier in Mrs May's absence to discuss the progress of negotiations. Mrs May's hand is strengthened by the fact her government's flagship EU (Withdrawal) Bill, revoking the 1972 Act, cleared Parliament shortly before the summit.

July

Senior British ministers will meet at Chequers - reportedly on 5 and 6 July - to thrash out the final wording of a White Paper setting out in detail the government's vision for life after Brexit, to be published shortly afterwards.

Also in July, bills on post-Brexit trade and customs will return to the House of Commons, with the potential for rebellions on issues such as membership of the European Customs Union.

October

Mr Barnier says agreement is needed at the 18 October European Council summit on the final legal text of the Withdrawal Agreement, in order to give time for its ratification before Brexit Day.

The UK also wants a political declaration setting out the broad terms of the future relationship. If outstanding issues are not settled before the summit, there may be little scope for last-minute negotiation to clinch a deal in Brussels, as the leaders of the 27 remaining states are due to discuss Brexit in the absence of Mrs May.

November-December

If a final text is agreed at the October meeting, the Withdrawal Agreement will go to the UK and European parliaments for ratification. If not, there may be a last-ditch attempt to secure a deal at the European Council on 13 December - or even a special Brexit summit in November.

If agreement is not reached by the end of December, European Parliament Brexit co-ordinator Guy Verhofstadt has said it will be too late for it to ratified by MEPs in time for the official date of Brexit in March.

A Withdrawal and Implementation Bill will be introduced in parliament to give legal force to the Withdrawal Agreement. Another bill setting out post-Brexit immigration rules is expected by the end of the year.

2019

21-22 March

Final European Council summit in which the UK will take part as a member state.

29 March

Two years after the invocation of Article 50, the UK ceases to be a member of the EU. Because the exact moment of exit is midnight Brussels time, the UK is due to leave at 11pm on 29 March.

Under the terms of the EU (Withdrawal) Bill, the bulk of Brussels legislation will be automatically transposed on to the UK statute book. Britain will, however, continue to pay into the EU budget and remain subject to EU rules and regulations - while having no say over them - for the duration of the transition.

UK government assurances that a future relationship agreement can be finalised in time for Brexit Day have been treated with scepticism by many commentators.

June

European Parliament elections take place without the UK.

2020

Mr Barnier has said he expects negotiations to continue on Britain's future relationship, including a free trade deal, during the transition. Any agreement is likely to be subject to ratification by national and regional parliaments across the EU.

The UK will seek talks with other countries on free trade deals, though the Commission insists that these cannot be signed until the transition period is over. Intensive work can be expected on practical arrangements, such as the establishment of new regulatory agencies, recruitment of customs and immigration officers and amendment of business contracts.

31 December

The end of the transition period. Britain ceases payments into the EU's multi-year budget.

2021

Under the UK government's "backstop" proposals, elements of the Customs Union could remain in force throughout the UK after transition, in order to prevent a hard border in Northern Ireland.

Ministers say they expect this arrangement to last no longer than the end of 2021, by which time a better system will be in place.

However, UK Revenue and Customs has suggested it could take until 2023 to implement a "max fac" system, using technology to ensure free movement across the border.

2022

5 May

Last possible date for the next British general election.

2028

UK completes payment of outstanding commitments towards EU projects.

2064

UK ceases payments towards pensions of EU staff.