LONDON — In a first demonstration of the new reality in Parliament after the recent election, Prime Minister Theresa May and her shaky new government buckled under pressure on Thursday and agreed to fund abortions in England for women from Northern Ireland.

It was an abrupt rebuff to the Conservatives’ new ally, the Democratic Unionist Party of Northern Ireland, a fierce opponent of abortion and gay marriage that had appeared to advance its socially conservative agenda this week by agreeing to keep Mrs. May in power.

The issue is a delicate one because in Northern Ireland abortions are allowed only if a woman’s life is at risk or there is a permanent or serious risk to her physical or mental health. Pregnant women who travel to England, where the law is much less restrictive, currently have to pay for terminations.

The about-face on the issue was bitterly denounced by abortion opponents. “This is a black day for unborn children, for mothers and for democracy,” said John Smeaton, chief executive of the Society for the Protection of Unborn Children. “It’s a great day for the abortion industry, which cares nothing about unborn children and for the welfare of women.”