London (CNN) Two women are poised to rescue British Prime Minister Theresa May after her disastrous election performance last week. But they could also become the embattled leader's biggest threat, making demands that could infuriate lawmakers with the power to bring May down.

After losing her overall Parliamentary majority in an election that she was not required to hold until 2020, May is now courting support from Arlene Foster, the leader of the marginal Democratic Unionist Party (DUP) in Northern Ireland. The DUP won 10 seats and is now the Prime Minister's only hope of retaining control in Parliament.

She also needs the backing of Ruth Davidson -- leader of the Conservatives in Scotland, which won an unexpected 13 new seats, ensuring May wasn't completely wiped out.

Keeping both women happy, especially Foster, will be essential for May, who repeatedly promised stability in her campaign but delivered political chaos instead.

A Brexit bungle

May and her administration is scheduled to start Brexit talks with EU leaders in just seven days.

If those talks are not delayed, she will have to form a government and then get a new Brexit plan in play in a matter of days. Her party's losses were widely seen as the country's rejection of her "hard Brexit" vision, and her own party is now divided on whether to stick to the plan or return to the drawing board.

Davidson has made clear she wants May to soften her stance on Brexit, a move that would further rattle anti-EU Conservative backbenchers, many of whom pushed for the Brexit referendum in the first place.

Those backbenchers wield enormous power in the party, and although they say they are sticking by May, there's talk of revolt.

May had vowed to pull the country out of the EU's single market and customs union, essentially a free-trade zone, a move that many worry will batter the British economy. Scotland voted overwhelmingly to stay in the EU, so most Scottish party leaders have backed a softer Brexit.

The EU has said that if Britain wants to retain open terms of trade, it would have to keep its borders open to EU citizens -- but closing borders was at the heart of the Brexit campaign and some backbenchers will see a U-turn as going against the will of the people.

Foster leads a hardline anti-EU party and is supportive of some of May's Brexit plans. But she could make demands that will be tough for May to achieve. She wants Northern Ireland (which is British territory) to keep its border with the EU-member Republic of Ireland open. It's hard to see how that could be achieved without, at the very least, keeping Britain in the EU customs union -- which May has pledged to leave.

Foster has let the Prime Minister squirm for days as the DUP stalls in making its support for May official. As well as her Brexit demands, Foster is likely to demand a substantial increase in government funding for Northern Ireland.

LGBT and abortion rights

A key point of tension between Davidson and Foster is on LGBT rights. Same-sex marriage was legalized in England and Wales in 2013, and in Scotland a year later. But while Northern Ireland's assembly has passed a similar gay marriage bill, it was blocked by the DUP, whose roots lie in evangelical Christianity.

Davidson, who is gay, has campaigned hard for LGBT rights and has already expressed concerns to May about the DUP's potential influence, both in Northern Ireland and the rest of the UK.

"I asked for a categoric assurance that if any deal or scoping deal was done with the DUP there would be absolutely no rescission of LGBTI rights in the rest of the UK, in Great Britain, and that we would use any influence that we had to advance LGBTI rights in Northern Ireland," Davidson told the BBC.

"It's an issue very close to my heart and one that I wanted categoric assurances from the Prime Minister on, and I received (them)."

As a Protestant Unionist about to marry an Irish Catholic, here's the Amnesty Pride lecture I gave in Belfast...https://t.co/NdRaT2s3W5 — Ruth Davidson (@RuthDavidsonMSP) June 9, 2017

The DUP was on the frontline of the Save Ulster from Sodomy campaign, which failed to stop the 1982 decriminalization of homosexual sex in Northern Ireland.

Abortion is also still a criminal offense in Northern Ireland, except when pregnancy puts a mother's life in danger. The DUP is firmly against bringing abortion rights to the territory, even for rape victims.

While May will be trying to keep Davidson, Foster and her backbenchers happy, she will have another group of people to win back -- the British public. A petition calling for the Prime Minister's ouster over her alliance with the DUP on Change.org had reached more than 700,000 signatures by Monday.

A spokesman for May would not confirm or deny whether the Prime Minister would push the DUP on LGBT rights.

"This government's record in terms of LGBT rights is a very proud one and one which the government is very proud to promote and stand by," he said.

Foster denied allegations that her party would be a negative influence on the national Parliament in the Belfast Telegraph on Monday, saying she was focused on getting a good deal for Northern Ireland in Brexit talks.

"To those locally who are complaining the loudest about our position of influence, I say to them that the time for unreasonable behavior and unrealistic demands is over," she said.

"When I meet with the Prime Minister in London tomorrow I will be mindful of our responsibility to help bring stability to the nation at this time of challenge."