Brexit: EU Withdrawal bill suffers 15th defeat in Lords
The government's flagship Brexit bill is to return to the House of Commons having suffered a total of 15 defeats in the Lords.
Brexit Minister Lord Callanan said he had "a tremendous sigh of relief" as he wound up proceedings.
Labour urged Theresa May to take a "pragmatic view" of all the changes proposed by peers.
The 15th defeat came on the issue of environmental protection standards after Brexit.
Peers voted by a majority of 50 to say the government should set up a body to maintain EU standards.
Other defeats inflicted in the House of Lords - where the government does not have a majority - came on the customs union, the Irish border and removing the precise date of Brexit - 29 March 2019 - from the legislation.
MPs will now debate the amendments when the bill returns to the Commons, with no date officially set so far.
"No one can be in any doubt that we have listened," Lord Callanan told peers.
"The government has suffered defeats on 15 issues.
"Although I regret the number of defeats I am grateful to those many Lords who I think have worked constructively to improve the bill.
"This House has done its duty as a revising chamber. The bill has been scrutinised."
Labour's Lords Leader Baroness Smith said the bill was now "in better shape".
"I hope Mrs May will take a pragmatic view of how best to proceed rather than follow a purely ideological route that rejects sensible amendments," she added.
Earlier, peers backed a cross-party amendment designed to ensure EU environmental principles continue to have a basis in domestic law at the end of the post-Brexit transition period in December 2020.
It requires the environment secretary to bring forward proposals for primary legislation to create a duty on public authorities to apply these principles, and to establish an independent public body to ensure compliance.
Lord Krebs, who instigated the move, argued that while EU rules would be carried over into UK law, environmental principles underpinning them would not.
Ministers had promised a consultation on the issue but lost by 294 to 244.
Lord Krebs, the former chair of the Food Standards Agency, said he was "not satisfied" with the idea of a consultation and wanted guarantees that existing principles will continue to apply and be enforced.
"We have heard many times that the purpose of the Bill is to ensure that everything is the same the day after Brexit as it was the day before," he said.
"Yet for environmental protection things will not be the same. We're talking about the protection of our air quality, our water quality, rivers, oceans, habitats and biodiversity."
Lord Callanan argued the proposed change was "premature" in that it prejudged a period of consultation and would "ultimately be detrimental to the future protection of environmental law".