With just over two months to go before the UK leaves the European Union (EU), Prime Minister Boris Johnson feels “marginally more optimistic” and knows he has the support of the United Stats.

The British leader recently picked up the baton from Theresa May, who resigned after failing to reach an agreement on the terms of the disconnection.

The conservative leader said, according to Reuters, that he is willing to talk until the end, but if no compromise is reached, he will take his country out of the organization on Oct. 31.

“Well I do think that the EU does tend to come to an agreement right at the end,” Johnson told Reuters in the hope that a compromise can eventually be reached.

A Brexit without agreement could have immediate economic consequences for the United Kingdom, the world’s fifth largest economy, leaving a market of 500 million consumers.

However, the British prime minister received good news in his meeting with President Donald Trump at the G-7 Summit in Biarritz (France) this weekend, who promised to negotiate a bilateral “major trade agreement” between the two powers.

President Trump warmly praised Johnson after his meeting and encouraged him to “do something about Brexit.”

“The European Union is very tough to make deals with,” President Trump said, according to the same media. “Just ask Theresa May.”

Johnson also used the occasion of this leaders’ summit to gain Australia’s support, and even reached an agreement with Prime Minister Scott Morrison to work on a trade agreement once Brexit is over.

Egyptian President Abde-Fattah el-Sissi expressed his country’s desire to “strengthen economic, trade and security co-operation between the U.K. and Egypt” in a bilateral meeting between the two leaders on Monday, according to AP.

In this context, Johnson said Monday that he was “marginally more optimistic,” according to AP.

“But, remember that all statistical estimates that I give about the chances of a deal—whether they are expressed in odds of millions to one, or getting closer, or hotter or colder, or whatever—they all depend exclusively on the willingness of our friends and partners to compromise on that crucial point and to get rid of the backstop and the current withdrawal agreement,” he added.

On June 23, 2016, more than half of British citizens voted in a referendum to leave the European Union.

However, then Prime Minister Theresa May, failed to get the British Parliament to approve the agreement she had negotiated with the EU after presenting it three times, which led to her resignation.