FILE PHOTO: Ireland's Prime Minister (Taoiseach) and Defence Minister Leo Varadkar attends a news conference after a European Union leaders summit in Brussels, Belgium December 14, 2018. REUTERS/Piroschka Van De Wouw

DUBLIN (Reuters) - Ireland’s prime minister pledged to defend the contentious Brexit “backstop” but said it was important to remember that the insurance mechanism was a means to an end of avoiding the return of a hard customs border on the island of Ireland.

The Brexit divorce deal was resoundingly defeated by British lawmakers on Tuesday, with much of the opposition centered on the “backstop” requirement for the British province of Northern Ireland to stay closely aligned to EU rules to eliminate the need for border checks with EU member Ireland.

The Irish government joined the European Union’s executive in insisting that the divorce deal with the bloc was not open for renegotiation and urged London to come up with solutions that both they and the European Union can accept.

EU officials have said that were Britain, for instance, to drop its refusal to remain permanently in a customs union with the EU, then the bloc would be willing to negotiate that and this could ease difficulties around the Irish border.

The EU’s chief negotiator Michel Barnier told Britain on Wednesday that it could have a different kind of Brexit deal -- but only if London changes its key demands.

“The only way we can avoid a hard border between Northern Ireland and Ireland in the long term is by having an agreement on customs, a common customs territory or customs union and regulatory alignment either between Northern Ireland and Ireland or the whole of the UK and the EU,” Varadkar told parliament.

“That is what we negotiated in the withdrawal agreement and the backstop... Absolutely, I’ll defend the backstop but the backstop is there as a means to an end. Let’s not forget what the backstop is, it is a legal guarantee that the mechanisms will be put in place to ensure no hardening of the border. It’s the outcome that we need to achieve.”