She is the strait-laced daughter of an Anglican priest who has championed conservative values all her life; he has for decades campaigned on issues dear to left-wingers all round the world.

Prime Minister Theresa May and Labour Party chief Jeremy Corbyn are poles apart, and there have been precious few signs of the two sharing any warmth for one another — but political reality has bound them together as Britain struggles to escape its Brexit agony.

May has infuriated more than 100 of her Conservative Party legislators by turning to Corbyn and the Labour Party for key votes in Parliament, just days before the country is due to leave the European Union.

Her pivot has led many to believe that she is ready to back a much softer version of Brexit — one that would keep Britain closely aligned economically with the EU. Their talks are ongoing, but given their history few think they will be able to find common ground.

May and Corbyn are ideological opponents representing different ends of the political spectrum.

However, they have similar problems: Both party leaders are perilously out of sync with many of their party's legislators.

May is viewed with suspicion by many of her lawmakers in part because she campaigned to remain in the EU during the 2016 referendum and is now reaching out to Corbyn for help getting her Brexit plan passed. Many argued this week that she should just take Britain out of the EU, even without a deal.

For Corbyn, the problem is similar: Many Labour legislators are still determined to keep Britain inside the EU via a second referendum, and they view Corbyn's pursuit of a so-called "soft Brexit" as a betrayal of that cherished goal. And they are angered by his acceptance that Brexit will mean an end to freedom of movement for Britons and EU citizens alike.

But that may be all they have in common.

May served a long apprenticeship in a variety of posts before becoming Conservative Party chairwoman in 2002. She moved into a senior Cabinet position as Home Secretary when the party took power in 2010.

She rose to prime minister not through an election but by outsmarting a number of rivals to emerge as party leader after David Cameron's resignation in 2016 — and she performed badly in an ill-timed general election that cost her party its majority in Parliament.

Corbyn's path to his party's top job was not as traditional. Elected to Parliament in 1983, he didn't take a job in government during the 13 years when Tony Blair and Gordon Brown were prime ministers. He was a serial opponent of many of their policies, notably the 2003 Iraq War.

He seemed destined to remain outside the mainstream, until Labour Party members surged his way in the 2015 leadership contest. He built on this startling triumph by doing unexpectedly well in the 2017 general election. He has taken the party far to the left of where it was in the Blair/Brown governments.

Some of his positions have infuriated the British establishment. He has, for example, ruled out the use of nuclear weapons under any circumstances if he becomes prime minister — a policy that defense chiefs believe ruins the effectiveness of Britain's costly nuclear deterrent.

At times he has also seemed weak on etiquette. Some commentators complained he looked scruffy in a casual hooded raincoat on Remembrance Sunday in November, one of the most solemn events on the British calendar.

May, in contrast, wore an elegant black overcoat and a matching hat, looking every inch the leader as she placed a wreath on the Cenotaph monument to honor Britain's war dead.

Both at times seem wearied by the political combat. May has acknowledged her weakened position by promising to step down once Brexit is delivered — which will open the way for a fierce Conservative Party succession battle. Some allies have suggested that Corbyn, too, is thinking about retirement after 36 years in Parliament.