LONDON (Reuters) - Prime Minister Theresa May will urge her successor on Thursday to strengthen the bonds between England, Scotland, Wales and Northern Ireland, in a veiled criticism of those in her party who are widely thought to prefer Brexit to the union.

Britain's Prime Minister Theresa May is seen outside Downing Street in London, Britain July 3, 2019. REUTERS/Peter Nicholls

Both of the candidates to replace May, former London mayor Boris Johnson and foreign minister Jeremy Hunt, say they want to strengthen the union of the United Kingdom’s four nations.

But they also say they are willing to take Britain out of the European Union without a deal if no agreement can be reached with the bloc, which other ministers say could make Scottish independence more likely.

In a speech in Scotland in the dying days of her premiership, May will mark 20 years of devolution to Scotland, Wales and Northern Ireland by saying she believed her successor would build on the work done to strengthen the union’s ties.

“The job of prime minister of the United Kingdom of Great Britain and Northern Ireland brings with it privileges and responsibilities which you only really feel once the black door closes behind you,” she will say, referring to the door of her Downing Street official residence.

“One of the first and greatest is the duty you owe to strengthen the Union - to govern on behalf of the whole United Kingdom,” she will say, according to excerpts of her speech released by her office.

May’s successor will take up his role later this month and the first task will be to try to break the impasse in parliament over Brexit and end the uncertainty over whether, when and how Britain will leave the EU.

Johnson and Hunt have said they want to secure an agreement with the EU to deliver a smooth Brexit to minimize the disruption to businesses.

But if no agreement can be reached, both have said they would trigger a no-deal Brexit - something that some ministers say could fuel demands for a second independence referendum in Scotland, which voted to stay in the EU in the 2016 vote.

An opinion poll published in June showed a majority of Conservative Party members - who will make the final decision on Britain’s next prime minister - would accept losing Scotland from the United Kingdom as long as Brexit is delivered.

Calls for a new independence referendum in Scotland have grown since the Brexit vote. Scotland rejected independence by a 55-45% majority in a 2014 referendum.