Back(stop) to the drawing board?

The government must now take stock but will it be back(stop) to the drawing board with a new plan for the Irish border?

The DUP is hoping that's the case.

All along, it has said there is no need for such a mechanism and managed to get more MPs on its side than the government did.

Mrs May was still insisting there would be no deal at all without the backstop, but now she will surely have to return to Brussels and ask for something else.

It's not yet clear what that something else is - and given the EU and Irish government both say the deal's not up for renegotiation, the coming days and weeks ahead seem shrouded in political fog.

How have other NI parties reacted?

Sinn Féin leader Mary Lou McDonald said the result reinforced the need for the Irish government to "stand firm" on the backstop.

"We need to say clearly to the British that if they wish to Brexit then that's a matter for themselves, but any Brexit agreement needs to recognise, understand and protect the people, the economy and the peace process on this island," she added.

Ulster Unionist leader Robin Swann said the government needed to "grab this process by the scruff of the neck and seek an extension to Article 50" - a law which triggered the process of Brexit.

SDLP leader Colum Eastwood said the backstop was "essential".

"Northern Ireland's economy and stability can't be sacrificed because politicians in London have failed to recognise the obvious," he added.

While Alliance leader Naomi Long said the scale of the prime minister's defeat was "surprising", and said the only way forward was to have another referendum.

What have businesses said?

A large number of business and farming groups had urged MPs to back the deal and have reacted with concern at its rejection.

The Northern Ireland Chamber of Commerce said MPs most now "move beyond tactical manoeuvring."