Image copyright Getty Images Image caption Sajid Javid's special adviser was summoned to a meeting in connection with the leaking of government documents

Chancellor Sajid Javid "voiced his anger" to Boris Johnson over the sacking of one of his special advisers by No 10, the BBC has learned.

On Thursday, Sonia Khan was escorted from Downing Street by police after her security clearance was withdrawn.

It came after she was summoned to a meeting with the prime minister's senior aide Dominic Cummings, about government leaks.

Both Downing Street and Mr Javid have declined to comment about the issue.

Asked about the sacking on BBC Radio 4's Today programme, Mr Javid said he would not talk about personnel issues, but said: "I think my views are well understood."

He insisted that he had a "fantastic" relationship with Mr Johnson and called assertions from the Labour Party that he lacks authority over the Treasury "nonsense".

On Friday, shadow chancellor John McDonnell tweeted that Mr Cummings was "obviously in charge of the Treasury, as well as No 10".

Responding to the claim, Mr Javid said: "Every government has had opponents, they will always paint pictures that they want to exist, but they're not really there."

'Unhelpful political row'

The BBC's political correspondent, Iain Watson, said there appeared to be an informal investigation being conducted into the leak of the Operation Yellowhammer documents - commissioned under the previous regime at Downing Street - setting out the potential consequences of a no-deal Brexit.

A Downing Street source had previously pointed the finger for the leak at an unnamed former minister, prompting the then chancellor, Philip Hammond, to write to Mr Johnson and ask him to "apologise for the misleading briefing from No 10".

At the meeting with Mr Cummings, Ms Khan, who worked under Mr Hammond, handed over both her personal and work phones, and her phone logs were checked.

Evidence was found that she had been in touch with former colleagues who had worked for Mr Hammond, but not that she had been involved in leaking any sensitive government information.

No reason was given for her dismissal, but the BBC's Iain Watson said it was suggested the issue was about whether she could be trusted to be transparent with No 10.

He added that the dismissal - the second from Mr Javid's team within the month - comes amid efforts to impose greater staff discipline in Whitehall under the new PM, including a crackdown on leaks.

A Whitehall source told the BBC the sacking had created an "unhelpful political row" between Mr Javid and Mr Johnson, which was a "distraction from what the two men wanted to talk about - more funding for public services".

They added that the prime minister and chancellor had an "extremely close relationship" and this row would not derail their policy agenda.

And a former minister told the BBC he believed the dismissal was in conflict with the Ministerial Code, as staffing matters should be the responsibility of the relevant minister - in this case, the chancellor.

However, Whitehall's code of conduct does allow the prime minister to withdraw consent from the appointment of a special adviser by one of his ministers.

This happened to Mr Johnson when he was foreign secretary and Prime Minister Theresa May's team blocked the appointment of Will Walden - the former BBC journalist who had worked for Mr Johnson at City Hall.

And Mr Johnson has also blocked some of his cabinet ministers from making their first-choice appointments.

Ms Khan's dismissal follows the recent departure of another of Mr Javid's advisers and a female former adviser to cabinet minister Gavin Williamson who had moved to No 10.

One insider says the bigger picture is that, with Downing Street under new management, the disciplinary process has to be reset - and that the gender of those who have left is irrelevant.

'Like a mafia movie'

Speaking about Ms Khan's sacking on BBC Radio 4's Today programme, former No 10 director of communications Sir Craig Oliver said it raised questions about the longevity of Mr Cummings' role in government.

"If you're planning to stick around long term, you need to be able to build relationships. You need to understand that government is a complex machine and that you can't just simply go around firing people without speaking to their boss," he said.

"It's a bit like a mafia movie, almost, where somebody takes out a hit on somebody and hasn't sought permission from the boss," he added.

"That's sort of what's happening here at the moment, and the question is: how much does Sajid Javid push back and say, 'this cannot happen, I will not allow this to happen'?"

Javid cash boost

It comes as Mr Javid pledged to invest an extra £400m in further education for 16 to 19-year-olds next year when he sets out his spending plans on Wednesday.

Writing in the Guardian, the chancellor said the money would help fund new vocational qualifications - T-levels - which are due to be introduced in England from 2020.

It follows the government's announcement on Friday of a multi-billion pound cash boost for schools in England over the next three years.