It’s probably too early to organise the celebration buffet for six. But British farmers and campaign groups will no doubt be quietly rejoicing after the government suffered a massive defeat in the Lords yesterday over food standards after Brexit.

Peers voted by 307 to 212 for an amendment to the Agriculture Bill requiring food products imported under future trade deals to meet or exceed domestic standards for animal health and welfare, environmental protection, food safety, hygiene and traceability, and plant health.

It follows months of campaigning by farming and sustainability groups – including an NFU petition signed by over a million people this summer – and the defeat of a similar amendment to the bill proposed by Neil Parish, chairman of the Environment, Food and Rural Affairs Select Committee, in the Commons.

Proposing the amendment yesterday, Labour peer Lord Grantchester said: “Low-quality food cannot be allowed to jeopardise rural communities by undercutting UK farmers with product made using methods that would be illegal here.

“Consumers care about the welfare implications of, for example, US production methods that necessitate that chickens need chlorination to be made safe. They do not want chlorinated chicken or hormone-treated beef to be permitted to be imported and available on supermarket shelves,” he added.

“Voters who voted to get Brexit done can be forgiven for thinking that this was going to be enshrined in legislation – after all, it was in the Conservative Party manifesto. Now certainly is the chance to get it done here.”

The amendment makes various changes to the Agriculture Bill designed to protect UK food standards and improve parliamentary oversight over the food-related aspects of trade deals.

Firstly, it prevents any agri-food chapters of a trade agreement being ratified unless the secretary of state has laid before Parliament a statement confirming that any products imported into the UK will meet the minimum production standards of British law at the time of entry into the country.

Secondly, the secretary of state must lay regulations specifying a process for determining that the standards to which an imported food product has been produced or processed “are equivalent to, or exceed, the relevant domestic standards and regulations in relation to animal health and welfare, protection of the environment, food safety, hygiene and traceability, and plant health”.

Thirdly, the House of Commons must approve the relevant trade deal chapters, and the House of Lords must debate them, in the same way it did the Brexit withdrawal deal.

The Lords rebellion doesn’t, of course, mean these changes will come into effect. The bill will now return to the House of Commons, where the vote can be overturned.

But it does pile pressure on ministers to reconsider the need for legal safeguards to stop future trade deals allowing lower-quality food into the UK. And, many would argue, that’s a step in the right direction for British food standards after Brexit.