David Cameron has said Britain must agree a "divorce bill" with the European Union before trade talks can start as Theresa May prepared for her first face-to-face meeting with the bloc's chief negotiator.

Mrs May will host a working dinner with Michel Barnier and European Commission president Jean-Claude Juncker at Downing Street on Wednesday evening, which is expected to focus on the process of exit talks.

The issue of a Brexit "divorce bill" of an estimated £50 billion could arise, given Mr Barnier's insistence that the UK must "settle the accounts" before beginning talks on a future trading relationship with the EU.

The meeting also comes ahead of Saturday's European Council summit, when leaders of the other 27 EU countries will discuss their draft guidelines for negotiations, which reject the UK's pleas for parallel trade and divorce talks.

Answering questions at a global tourism summit in Bangkok, Mr Cameron appeared to back the EU's stance, saying: "I would hope that we will be able to agree, as it were, the first bits of divorce - it's a bit like a divorce, you have to deal with the money and then access to the children afterwards."

The former prime minister said he thought both sides could agree that "of course we accept some liabilities for this membership we've had for 40 years, just as we have a claim on some of the assets that we've paid into.

"And I think we can settle the principles of that and then get on with the nature of the relationship."

Senior members of the Government have insisted that Britain will not pay a bill of the scale suggested by the likes of Mr Juncker, with International Trade Secretary Liam Fox branding the idea "absurd".

But Mrs May has said she is ready to discuss a "fair settlement" of Britain's obligations, although she has given no hint of the amount she is prepared to contemplate.

Mr Cameron said he is optimistic about the outcome of Brexit, suggesting that the starting point for a deal could be maintaining free trade in goods, before striking sector-by-sector agreements in areas such as financial services, agriculture and air travel.

The separate agreements could be deals "in principle" to be implemented over a transition period, which the EU has acknowledged may be necessary in its draft guidelines.

"If business and industry can see, as it were, the landing zone of where you're going to end up, I don't think there then needs to be a fall in confidence about what happens next," Mr Cameron said.

The former Tory leader also backed Mrs May's decision to hold a General Election which she is seeking to define by Brexit, saying it would give her more time and political space to negotiate a good deal for the UK.

"It's very good that we are having this election, because I think if Theresa May is successful, she'll actually have a larger majority and, potentially, more time to deal with Brexit and its consequences," he said.

Brexit Secretary David Davis said "cool heads, strong leadership and traditional British resolve" would be needed to secure a good deal as the UK leaves the EU.

Speaking to the Prosperity UK conference in London, Mr Davis acknowledged Britain would have to make compromises in the negotiations, but insisted the country had "very good reason to feel optimistic".

"Securing an agreement with the EU, within the two-year period, about our withdrawal and the shape of our future relationship will be challenging," said Mr Davis.

"We will have difficult issues to confront. Compromises will be necessary on both sides."

He said visits to a dozen EU countries over recent weeks - including four in the last couple of days - had convinced him that the remaining member states wish to conduct negotiations "in a spirit of sincere co-operation".

He denied suggestions that Britain might take a "divide and rule" approach, playing the EU27 off against one another.

"Far from it," said Mr Davis. "We want the European Union to be united. Not just for the good of our continent, but also because it makes sense in the negotiations upon which we are about to embark. We want the negotiations to be swift and effective, so unity amongst the 27 helps with that."

Mrs May greeted the European Commission president with a kiss on both cheeks as he arrived in Number 10.

But the Prime Minister and Mr Juncker resisted demands from photographers to shake hands outside the famous black door.