It is a position which is outside the cabinet, unlike Secretary of State for Northern Ireland, which is in the cabinet.

Mr Brokenshire replaces Theresa Villiers, who is believed to have turned down Mr Brokenshire’s job, which would have been a demotion.

Mr Brokenshire held the post when his boss was Theresa May, who was Home Secretary.

He supported Remain in the referendum campaign, and then gave Mrs May his backing as candidate for the Conservative leadership.

Ms Villiers, who campaigned to leave the European Union, had supported Andrea Leadsom to become leader of the Tory Party.

Ms Villiers had held the position of Secretary of State since September 2012.

She said in a statement: “I regret to say that I have left the government. The new Prime Minister was kind enough to offer me a role but it was not one which I felt I could take on.

“I am very grateful to have been given the opportunity to serve on the front bench for 11 years, first in the Shadow Cabinet, then as Transport Minister, and finally as Secretary of State for Northern Ireland for four years in David Cameron’s Cabinet.

“I would like to thank everyone who has supported me during that time. I am sad to bring to end my work in Northern Ireland but I believe that I leave the political situation there in a more stable position than it has been for many years, not least because I was able to help tackle the crisis which a year ago left us on the brink of a collapse of devolution and a return to direct rule.”

Ms Villiers added: “I send my very best wishes to Northern Ireland’s leaders as they continue the crucial process of implementing the two historic agreements that the cross party talks I chaired were able to deliver.

“Northern Ireland and its people will always have a very special place in my heart and I am confident that progress will continue to be made to embed peace, stability and prosperity there.

“I wish the Prime Minister well in the great task on which she and her Government are about to embark to seize the many positive opportunities presented by the Brexit vote. They will have my full support in that vital work.”

She concluded: “I look forward to continuing to represent the interests of my Chipping Barnet constituents in Parliament with enthusiasm and diligence.”

Mr Brokenshire will face numerous challenges at Stormont.

Last weekend, Ms Villiers said that progress to resolve logjams hindering new mechanisms to deal with the toxic legacy of the Troubles could be achieved within weeks.

“We have made a tremendous amount of progress,” insisted Ms Villiers. “We are closer than ever before to reaching a consensus on the most effective way to address the legacy of the past through setting up the Stormont House bodies.”

In a recent speech at Stormont House, Ms Villiers said she looked forward to strengthening the bilateral relationship between the Republic of Ireland and the UK despite Brexit.

She will say: “We have seen all too well how history can divide. Our ambitious goal throughout this decade is seek to use history to unite.

“To build on the political progress that has been made here.

“To strengthen further the strong bilateral relationship that exists between the United Kingdom and Ireland ... a relationship that will endure long beyond the UK’s exit from the EU.”