In his maiden speech as prime minister on Wednesday, Boris Johnson repeated that the U.K. will “come out of the European Union on October 31st, no ifs or buts.”

Some may view this position as irresponsible -- either for prematurely tying the country’s hands in what are likely to be tricky negotiations with the EU or for forcing Johnson to break a very public and oft-repeated promise less than 100 days after assuming office. Yet, in the game theory framework I set out last December to explain why the approach of his predecessor Theresa May risked getting stuck in the muddle-middle, Johnson’s approach may offer both the EU and the U.K. a way out of an impasse that is harming both sides.

Unable to unite her Conservative Party, let alone secure a majority in Parliament, May ended up not having the political clout to shift negotiations with the EU out of a “no-war, no-peace” battle of attrition. As such, it was virtually inevitable that that the U.K. would end up forced to negotiate a series of deadline extensions with its European partners. The EU, for its part, was unable to impose an orderly Brexit on the U.K., let alone a return to the status quo ante (“remain”). Neither was it willing to force a hard Brexit.

Some viewed this “slow Brexit” process as buying time for both sides and, therefore, maintaining the possibility of a better outcome down the road. But, as I argued, it came with notable and mounting costs for both sides. It undermined their ability to address structural impediments to high and more inclusive growth -- not just in the U.K., where politics became hostage to a single issue, but also in Europe where the economy has been slowing significantly. It confronted companies with considerable uncertainty regarding the environment in which they would operate, paralyzing investment decisions. And it fed divisive forces in a climate of heightened sensitivity to cultural, identity and migration issues.

By having run on a less ambiguous Brexit platform, and by having been elected leader of his party by an overwhelming majority, Johnson has put down a clear come-what-may marker for the EU. If he can also convey a sense of parliamentary unity behind his position, he should be able to force the EU into compromise -- that is, the EU agreeing to a multi-stage process that combines a formal Brexit on Oct. 31 with various transitional agreements to minimize the risks of a disorderly exit process.

While he is better placed than his predecessor, Johnson’s all-or-nothing approach is far from obstacle-free. Indeed, we need only look back at how last spring’s European Parliament elections -- which neither side wished to contest while negotiations remained paralyzed -- failed to force resolution. Also, the British Parliament remains divided, as does the nation.

Perhaps the additional realization that the costs over time of a continued slow Brexit process could end up being higher than that associated with either a hard Brexit or a decision to pursue a second and potentially indeterminate U.K. referendum will provide that final element that tips both sides into a workable and durable compromise.

Mohamed A. El-Erian is a Bloomberg Opinion columnist. He is the chief economic adviser at Allianz SE, the parent company of Pimco, where he served as CEO and co-CIO. He is president-elect of Queens' College, Cambridge, senior adviser at Gramercy and professor of practice at Wharton. His books include "The Only Game in Town" and "When Markets Collide."