There were plenty of names bandied around as likely candidates to be the next governor of the Bank of England but in the end the government has chosen the person who has been the bookies’ favourite from the start.

When it came to it, the only thing surprising about Sajid Javid’s decision to appoint Andrew Bailey to succeed Mark Carney was that the process took so long. And as the months dragged by, and Carney’s term was extended twice, speculation grew that Bailey would be overlooked.

There was a precedent for this. The last time the governor’s job was up for grabs, the smart money was on Paul Tucker, then a deputy governor. But George Osborne surprised everybody by wooing Carney from the Bank of Canada.

There was never any doubt about Bailey’s competence. After more than three decades at Threadneedle Street, he knows the Bank inside out and has experience of all three of the organisation’s responsibilities: monetary policy; the stability of the City; and supervision of financial institutions. In another plus point as far as the government is concerned, he has kept his views on Brexit to himself.

But Philip Hammond, Javid’s predecessor, thought Carney brought something extra to the job: a sprinkling of stardust. Hammond knew that people put down their smartphones and listened when Carney spoke at an international meetings and wondered whether there was another like him out there.

So the Treasury cast its net far and wide. The former central bank governor of India, Rajan Raghuram was approached. There was talk of Janet Yellen, the former US Federal Reserve chair, getting the gig. There was even speculation, never with any foundation, that the government might look to Mario Draghi, the former president of the European Central Bank. Other names considered were Minouche Shafik, the director of the London School of Economics, and Santander UK’s Shriti Vadera – either of whom would have become the Bank’s first female governor. Had Labour won the election, John McDonnell would have picked the Bank’s chief economist, Andy Haldane.

The process was further complicated by Boris Johnson’s arrival in 10 Downing Street in the summer because this brought another name – Gerard Lyons – into the frame. Lyons was not on Hammond’s shortlist for the job but had three things going for him: he was an economist who supported Brexit; he had worked for Johnson when he was mayor of London; and he was as optimistic about Britain’s post-EU future as the prime minister himself.

But for Lyons to get the job, Johnson would have had to go against the strong advice from the Treasury that Bailey was the right choice, and this he was not prepared to do.

Sign up to the daily Business Today email or follow Guardian Business on Twitter at @BusinessDesk

Javid would have named Bailey some months ago but the delay caused by the timing of the general election proved to be a blessing in disguise for the Bank, since the announcement of the new governor diverted attention from the revelation this week of an embarrassing security breach that gave hedge funds early access to audio feeds of Carney’s press conferences.

Bailey has not been without his critics as head of the City’s watchdog, the Financial Conduct Authority. He came under fire over the treatment of small businesses by RBS and over the failure to take action earlier over the fund manager Neil Woodford.

But he was battle-hardened during the financial crisis of 2008, when he led the Bank’s team that sorted out the problems of the UK banking sector – cited by Javid when announcing his decision – and has been closely involved in discussions with other EU nations over the shape of the financial services sector after Brexit.

The fact that the prime minister could see the merits of a safe pair of hands suggests that the government might not be quite as upbeat about the immediate prospects for the economy as it made out while campaigning for re-election.