Updated

Ireland's prime minister says the European Union and Britain must be "creative and imaginative" to avoid creating a "hard" border between his country and the U.K. after Brexit.

Prime Minister Enda Kenny met Thursday with German Chancellor Angela Merkel to discuss what implications Britain's departure from the EU will have for Ireland.

Kenny told reporters in Berlin any solution must be compatible with EU law. But he stressed that "we must not get lost in the technical detail at this stage and lose sight of the principles objective of maintaining peace and stability" in Northern Ireland, which is part of the UK and borders Ireland.

Merkel acknowledge that Ireland was particularly affected by Britain's divorce from the EU and said its fellow EU states would take "great care" with the issue.