LONDON (AP) — As Cabinet ministers quit and lawmakers demanded her resignation, cricket-loving British Prime Minister Theresa May summoned the spirit of one of her sports heroes.

Asked by a reporter "how many wickets need to fall" before she was out, May spoke of her admiration for Geoffrey Boycott, a cricketer who was famous for his dull but effective batting style.

"Geoffrey Boycott stuck to it and he got the runs in the end," she said.

Commentators writing about May often use adjectives like dogged, diligent and robotic — as they were with Boycott during a controversial and highly successful career that lasted over two decades to the mid-1980s.

In politics, those qualities are often considered weaknesses, but they may turn out to be assets as Britain's prime minister fights for her political life and the future of the Brexit deal she has struck with the European Union.

May, 62, became prime minister because of Brexit, after Britain's shock June 2016 vote to leave the EU toppled Prime Minister David Cameron, who had argued for remaining in the bloc. And she has spent her entire premiership trying to deliver on the voters' decision.

Before the referendum, May had backed remaining in the bloc, but she has become one of the staunchest advocates of Brexit. "Brexit means Brexit," became her mantra — a meaningless one, according to her detractors.

For a time, May was able to unite the warring factions of her party. But her authority was severely dented when she gambled in April 2017 by calling a snap election in hopes of strengthening her hand in divorce negotiations with the EU — only to lose her majority in Parliament.

May kept her government going by cobbling together a deal with the small Democratic Unionist Party of Northern Ireland. It is now threatening to withdraw its support because of opposition to her Brexit deal.

Much of May's Conservative Party also hates the agreement, struck after a year and a half of tough negotiations between Britain and the EU.

The pro-Brexit wing of the party says it gives too much away and will leave Britain bound to EU rules after it leaves. Pro-EU Conservatives criticize May for ruling out a softer Brexit in which Britain remains in the EU's single market and customs union.

May vowed this week that she would "see this through" and secure Parliament's backing for her deal.

Few doubt her fortitude and commitment to an idea of public service instilled in her upbringing as the daughter of an Anglican vicar.

May was first elected to Parliament in 1997, and soon established a reputation for unflashy competence and a knack for vanquishing her rivals.

She served for six years in the notoriously thankless job of home secretary, responsible for borders, immigration and law and order. In 2016 she beat flashier and better-known politicians, including flamboyant Brexit-backer Boris Johnson, to the post of prime minister.

But stubbornness alone may not be enough.

As Britain's second female prime minister, May is inevitably compared to the first, Margaret Thatcher, whose steely determination May admires.

In November 1990, Thatcher faced a leadership challenge from Conservative rivals. She won the ballot, but not by enough to avoid a second-round vote.

"I shall fight on," Thatcher said defiantly. "I fight to win."

Within a week, she had been replaced.

Copyright 2018 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.