Prime Minister Theresa May on Wednesday criticized the increasing intolerance and absolutism of world politics, in a message many will see as aimed at her successor as Britain’s leader — and at President Donald Trump.

May, who is due to leave office in a week after a three-year premiership dominated by Brexit, condemned the “politics of division” and said “some are losing the ability to disagree without demeaning the views of others.”

May announced her resignation last month after Parliament rejected her divorce deal with the European Union, which was intended to secure Britain’s orderly departure from the bloc. It was defeated in part by pro-Brexit members of May’s Conservative Party who condemned its compromises with the EU.

“Today an inability to combine principles with pragmatism and make a compromise when required seems to have driven our whole political discourse down the wrong path,” she told an audience at the Chatham House international affairs think-tank.

“It has led to what is in effect an form of absolutism — one which believes that if you simply assert your view loud enough and long enough you will get your way in the end. Or that mobilizing your own faction is more important than bringing others with you.”

In her last major speech as leader, May condemned the populist politics of “winners and losers, which views compromise and cooperation through international institutions as signs of weakness, not strength.”

She defended international cooperation and stressed the need to preserve the Paris climate accord and the international nuclear agreement with Iran, both of which Trump has rejected.

May has had a sometimes bruising relationship with the U.S. president, who has called her approach to Brexit “foolish” and said she should have listened to his advice to sue the EU. Last week, Britain’s ambassador to Washington resigned after a Trump responded with fury to leaked memos giving the envoy’s frank opinion of the “chaotic” and “dysfunctional” White House.

The prime minister has had an equally torrid time with her own party, which forced her out of office after she failed in her goal of delivering Brexit.

The two men competing to succeed her, Boris Johnson and Jeremy Hunt, both say they will succeed where May failed and leave the EU — with or without a deal.

May cautioned against a disruptive exit, saying the next prime minister must find a way to leave “that is in the national interest.”

“Actually getting things done, rather than simply getting them said, requires some qualities that have become unfashionable of late,” she said. “One of them is a willingness to compromise.”

© The Associated Press. All rights reserved.