Media playback is unsupported on your device Media caption Brexit: DUP's Nigel Dodds says party's focus is the integrity of the union

The Democratic Unionist Party (DUP) has voted for a proposal that could delay Brexit until all necessary UK laws are passed in Parliament.

MPs voted by 322 to 306 to pass the so-called Letwin amendment to the government's Brexit deal, inflicting a blow on the prime minster's strategy.

The DUP backs Brexit, but does not support the prime minister's revised proposals for Northern Ireland.

It is not clear when Number 10 will now hold a meaningful vote on its deal.

MPs met on Saturday for a rare sitting, with the government hoping to hold a vote on its Brexit deal - but that vote was pulled after they voted for the Letwin amendment.

Independent unionist MP for North Down, Lady Hermon, backed it as well.

It withholds approval of the deal until the legislation to enact it - known as the Withdrawal Agreement Bill (WAB) - is safely passed: a move that automatically triggers the "Benn Act" to force the prime minister to request a further postponement of Brexit until 31 January.

A Downing Street source told the BBC Boris Johnson would send a letter to the EU by 00:00 BST to request a Brexit delay but he will not sign it,

The request will be accompanied by a second letter, signed by Mr Johnson, which will say he believes that a delay would be a mistake, the source said.

The prime minister has vowed to bring in legislation on Monday to implement the deal he struck with Brussels this week.

'Doing NI a favour'

DUP East Antrim MP Sammy Wilson said voting against the government was "the only way" to ensure there was proper scrutiny of the deal.

"We were doing the people of Northern Ireland a favour as well by ensuring that their interests are properly represented," he added.

He said the DUP would now seek changes to the deal, in order address concerns the party has, and suggested the party would vote against the WAB if revisions were not made.

Analysis: A timely reminder from the DUP

By Jayne McCormack, BBC News NI Political Reporter

Boris Johnson just got a taste of what Theresa May faced from the DUP when she was prime minister.

The party's 10 votes, as well as Lady Hermon's, were decisive in inflicting defeat on the government.

But in less than a year since Mr Johnson gave the keynote speech at the DUP conference, he has seriously fractured the Conservative Party's relationship with Northern Ireland unionism.

The DUP had conceded on regulatory checks in the Irish Sea; in return expecting Mr Johnson to make other commitments to them.

But he didn't.

So the DUP are reminding the PM that, for now at least, they still hold the balance of power in Parliament when it comes to such huge votes.

The DUP is opposed to the consent mechanism in the Brexit deal, which would give the Northern Ireland Assembly a say on whether to continue following EU customs rules.

It would take place by a simply majority vote: pro-EU parties have a narrow majority at Stormont and there would be no unionist veto, as demanded by the DUP.

Veto demand a 'pity'

Earlier Mr Dodds had told Boris Johnson he needed to respect the concerns of unionists - but the prime minister dismissed suggestions that his deal breached the principle of consent.

Under the terms of the Good Friday Agreement, votes on contentious matters should be backed by a majority of unionists and nationalists.

Image copyright Dan Kitwood Image caption Boris Johnson said his deal is fully compatible with the Good Friday Agreement

"In all frankness I do think it a pity that it is thought necessary for one side or the other of the debate in Northern Ireland to have a veto on those arrangements," he told MPs.

He argued that the Brexit referendum had taken place on a straight majority basis, adding: "I think that principle should be applied elsewhere, I see no reason why it should not apply in Northern Ireland as well."

'Inviolable'

Media playback is unsupported on your device Media caption Lady Hermon wants 'clear guarantee' on Brexit deal

Independent unionist MP for North Down, Lady Hermon, has not confirmed whether she will support the government's plan.

She told Mr Johnson there is "anger" in Northern Ireland's unionist community over his deal - but the PM said he is committed to the constitutional position of Northern Ireland, calling it "inviolable".

Meanwhile, in a statement released after the vote, Taoiseach (Irish Prime Minister) Leo Varadkar said that the European Union and United Kingdom had made a withdrawal agreement last Thursday that defends Ireland's interests.

"To date, no request for an extension has been made by the UK government. Should that happen, President Tusk will consult with all 27 heads of state and government on whether or not we will grant one. An extension can only be granted by unanimity," he said.

Sinn Féin president Mary Lou McDonald said Saturday's Westminster debate was "farce and dysfunction".

"Today's antics and bluster will not allay the fears of Irish workers, business or agri foods producers and our border communities," she said.

Media playback is unsupported on your device Media caption DUP: PM 'too eager for deal at any cost'

What does the deal involve for NI?

The new Brexit deal would involve Stormont giving ongoing consent to any special arrangements for Northern Ireland via a straight majority, instead of on a cross-community basis.

Northern Ireland would continue to follow EU rules on food safety and product standards and would also leave the EU customs union.

But EU customs procedures would still apply on goods coming into Northern Ireland from Great Britain in order to avoid checks at the border.

Image copyright AFP Image caption The issue of the Irish border has been the most contentious in the Brexit talks

Stormont would have to approve those arrangements on an ongoing basis.

Approval would involve a straight-forward majority, which would keep the special arrangements in place for four years.

Alternatively, if the arrangements are approved by a majority of nationalists and a majority of unionists, they would remain in place for eight years.

If the Northern Ireland Assembly voted to end the arrangements there would be a two-year notice period, during which the UK and the EU would have to agree ways to protect the peace process and avoid a hard border.

If a vote was not held - by choice or because the assembly was not sitting - then the government has committed to finding an "alternative process".