DUBLIN (Reuters) - Ireland will consult with Britain before it decides whether to participate in a European travel ban endorsed by fellow EU member states on Tuesday to contain the spread of coronavirus, a government spokesman said.

FILE PHOTO: Ireland's Prime Minister, Taoiseach Leo Varadkar addresses a Friends of Ireland luncheon held in his honor on Capitol Hill in Washington, U.S., March 12, 2020. REUTERS/Tom Brenner

EU leaders agreed to close Europe’s external borders for 30 days to foreigners to combat the disease and the head of the bloc’s executive said it would be up to each country to implement.

Ireland’s participation is complicated by the fact that it shares an open land border with the British-run province of Northern Ireland and a common travel area with the whole of the United Kingdom, which ensures freedom of movement between both islands.

Neither Ireland nor Britain, which left the EU at the end of January, are members of Europe’s Schengen zone of open borders.

“Ireland will consider participation in the context of the common travel area and in consultation with the UK,” an Irish government spokesman said after following a video conference of EU leaders.

Prime Minister Leo Varadkar, who will make a televised address on coronavirus at 2100 GMT, spoke to European Commission President Ursula von der Leyen on Monday and stressed that Ireland will never close its border with Northern Ireland.

The 500-km land frontier is a key part of a 1998 peace agreement that ended three decades of sectarian violence in Northern Ireland, in which some 3,600 people were killed.

Dublin feared the return of border controls throughout Britain’s messy Brexit divorce saga, holding up its neighbor’s departure from the bloc on several occasions and eventually leading to an agreement that there would be no such controls.

But while Ireland has closed schools, universities, bars and childcare facilities to try to slow the spread of coronavirus, Britain has kept all of those open in Northern Ireland, flipping the Irish border issue on its head.

Ireland upgraded its travel advice on Monday to limit all non-essential travel overseas until at least March 29, including Britain but not Northern Ireland.

Anyone coming into Ireland, apart from Northern Ireland, will be required to restrict their movements on arrival for 14 days, including Irish residents, the foreign ministry said.