LONDON — Prime Minister Keir Starmer formally apologized Thursday for the British state’s role in separating tens of thousands of unmarried mothers from their babies, a practice that lasted for decades until the 1970s.

He said in Parliament that “we are deeply and profoundly sorry” for what he called a “stain on our history.”

An estimated 185,000 babies of unmarried mothers were adopted in England and Wales between 1949 and 1976. Campaigners have fought for years for acknowledgment that women were pressured, deceived and threatened into giving up their babies.

Starmer met Thursday with a group of campaigners, who watched from the public gallery of the House of Commons as he delivered the apology.

He said that women were “coerced, bullied or misled into feeling that they had no choice but to have their children taken away from them.

“Children grew up believing they were unwanted” and mothers were told “their babies would be better off without them,” he said.

“To each and every one of those affected, we say a deep and heartfelt sorry,” said Starmer, who is in his final weeks as Britain’s leader.

Alongside the apology, he announced support for affected mothers and children, including better access to adoption records and mental health support.

Britain is one of several countries reckoning with the legacy of social norms, religious practices and government policies that heaped shame on unwed mothers, hid them away in institutions while pregnant and took their children to be adopted by married couples.

After Starmer spoke, several lawmakers in the House of Commons made emotional speeches about their own experiences.

Sarah Pochin of opposition party Reform UK choked back tears as she said that her mother “was pressurized into giving up a baby for adoption” in a process handled by the church.

“I only found out after her death — she carried her secret to her grave,” added Pochin, who said she managed to find and contact her brother after considerable effort.

Ann Keen, a former health minister whose baby was taken for adoption in 1966 when she was 17, said the apology was part of “being released from my shame.”

“We need this apology, because we have always been accused of giving up our babies, and we didn’t give them up,” she told the BBC. “We’ve now got the opportunity to really put this wrong right.”