Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

LONDON — Britain on Thursday moved a step closer to having its second female prime minister as the contest to lead the country’s ruling Conservative party narrowed to two women.

Theresa May and Andrea Leadsom emerged as the favorites in a ballot of lawmakers that was triggered by David Cameron’s resignation over last month’s Brexit vote.

The two candidates now face a nationwide vote of about 150,000 Conservative party members on September 9 — two months before Hillary Clinton hopes to make history for in the U.S. presidential race.

Britain's only female prime minister was Margaret Thatcher, who stood down in 1990 after an 11-year stint in power.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

The winner of the current Conservative contest will have the unenviable task of deciding when to start the official two-year process of Britain’s negotiated withdrawal from the European Union.

She also will face the challenge of trying to unite a party split straight down the middle on the Brexit issue.

Conservative Members of Parliament were choosing between Theresa May (L), Andrea Leadsom and Michael Gove. STAFF / Reuters

May, currently Britain’s Home Secretary, was on the losing side of the bi-partisan referendum but kept a lower profile than many of her pro-"Remain" colleagues and is seen as a unifying candidate.

In announcing her leadership plans a week ago, the 59-year-old pledged to heal a wounded party that seemed close to tearing itself apart over Brexit.

She is the clear favorite, winning 199 votes against 84 for Leadsom. The third candidate, Justice Secretary Michael Gove, was eliminated after receiving 46 votes.

Related: Could the U.K. Wriggle Out of Brexit? Kerry Thinks So

Leadsom, 53, was a high-profile campaigner for Brexit and believes the result of the referendum must not be ignored despite continued financial and political uncertainty.

In a speech earlier Thursday, she said it was time to "banish the pessimists," adding: "No one needs to fear our decision to leave the EU.”

Gove was unpopular with colleagues in parliament after his surprise decision to enter the leadership race — a move that effectively ended the ambitions of his friend and pro-Brexit ally, Boris Johnson.

Two other contenders, veteran right-winger Liam Fox and newcomer Stephen Crabb, dropped out of the race on July 5 after receiving the lowest support in the first round of voting.