A Wiltshire MP has voted against the government in what was seen as a key test of Rishi Sunak's leadership.

Danny Kruger, MP for Devizes, voted against part of the new Windsor Framework, negotiated between Mr Sunak and the EU last month.

But the so-called Stormont brake, designed to give a veto over the imposition of new EU rules in Northern Ireland, was passed comfortably by 515 votes to 29, with Labour and other opposition parties backing it.

Mr Kruger said he voted against it "with a heavy heart as the Prime Minister has negotiated some real improvements to the Protocol". 

He added that the immediate politics of what he did is "regrettable", but added: "I believe it was the right thing to do, because the improvements to the Protocol come at too high a price."

In a post on his website, Mr Kruger said: "The Windsor Framework effectively trades the paramountcy of UK law in Northern Ireland for some limited ‘easements’ in trade flows within the borders of our own country.

"Seed potatoes can once again travel from GB to NI, and many other businesses sending goods across the Irish Sea for domestic consumption will no longer have to fill in complicated customs forms, because HMRC will do the paperwork (and send it to the EU) for them.

"In exchange, the status of Northern Ireland, guaranteed in the Acts of Union of 1800 which states that the whole of the UK shall be a single customs area under a single sovereign jurisdiction, is compromised.

"To put it facetiously, we are selling the birthright of Northern Ireland for a mess of potatoage." 

Mr Kruger goes on to say that the Protocol was "bad enough, but it was always understood to be temporary". 

He adds: "We had an alternative, which was the Northern Ireland Protocol Bill, recently passed by the House of Commons and currently in limbo, pending its abandonment by the Government as the price of the Windsor agreement with the EU.

"This would have asserted the supremacy of UK law in Northern Ireland and allowed businesses which wished to trade with the EU to operate under EU law.

"Our European partners did not approve of this approach, and it would have made life difficult for the Prime Minister in his negotiations on other vital matters like Ukraine and the small boats - so I understand his willingness to drop the Bill.

"But it would have enabled a permanent settlement in Northern Ireland that actually worked in the long term."