Image copyright PA Image caption Camila Batmanghelidjh is chief executive of Kids Company

Charity Kids Company, which received £3m from ministers a week ago, has told the government it will close its services on Wednesday evening.

The youth work charity received the money against the advice of officials, who had raised concerns about how it would be spent.

Local authorities have been making plans to support young people who would need help if Kids Company closes.

Kids Company said closure speculation was "dangerous and irresponsible".

The Cabinet Office said it would not comment on whether the charity would close.

Staff payment

The news that the charity might have to close comes as the result of a joint investigation by BBC Newsnight and BuzzFeed News.

Last month, their investigations revealed that the £3m grant from the Cabinet Office would only be paid on the condition that Camila Batmanghelidjh, its high-profile chief executive, agreed to step down as part of a reorganisation. The government finally released the money last week after she said she would do so.

The Cabinet Office's £3m grant had been intended for a "transformation and downsizing plan" that would support the charity as it reformed itself.

That department is currently making plans to recover the grant because the Cabinet Office believes that the conditions attached to the use of the money were not met.

According to an email cache passed anonymously to Newsnight and BuzzFeed News over the weekend, the charity appears to have used some of the cash to pay staff - a day-to-day cost for which officials say it was not intended, and which should have been met by private donations.

Image copyright Getty Images Image caption The high-profile charity has regularly hosted leading politicians

The charity, which relies heavily on public funding, supports deprived young people with counselling services, education, hot meals and housing provisions.

Ms Batmanghelidjh wrote to staff last Tuesday saying: "I am so sorry you have not been paid yet. We are waiting for exchanges between the government and the philanthropists and trustees to be completed."

On Wednesday, she wrote: "Everything has been agreed, we are going ahead with payroll. It will be done tomorrow as soon as the money hits our account.

"Thank you for your patience. You have been amazing and I am so sorry that the machinery of Whitehall was slower than we would have liked."

On Thursday, when the Cabinet Office grant had been cleared into the charity's bank account, she wrote: "I just want to let you know that we have just received our funding from the government and are processing payroll right now."

The charity said: "Kids Company's July payroll was two days later than usual whilst we waited for a grant from the Cabinet Office to arrive."

According to one official familiar with the matter, £800,000 was paid out immediately to staff.

Officials are now working out how much of the grant they will be able to recover.

Kids Company said it was "grateful for the ongoing support of the Cabinet Office that recognises the need for our work supporting some of society's most vulnerable children and young people". It is not clear what conditions the charity understood were attached to the grant.

On Tuesday afternoon government officials, charities and local authorities were briefed on the likely impact of of the charity closing its services.

The decision to make the £3m grant was controversial. The Cabinet Office's lead official, Richard Heaton, wrote to ministers on 26 June asking for a "ministerial direction" before making the payment.

The permanent secretary logged his view that he thought the grant would be poor value for money. He sought written confirmation that they wanted him to go ahead with a grant regardless.

Mr Heaton said: "It is... my judgement that the proposed additional £3m grant does not represent value for money, in terms of delivering the outcomes for which the department is funded by parliament."

Civil service scepticism

Ministerial directions are relatively rare; only three were requested in the past parliament across government.

In their reply, Matthew Hancock and Oliver Letwin, Cabinet Office ministers, said he should press ahead and that they took confidence "from the changes that Kids Company has undertaken to make in terms of its leadership, management and governance, which we judge do give it a realistic prospect of long-term viability so it can continue to deliver for vulnerable young people".

This is not the first occasion on which Mr Letwin had intervened to secure funding for the charity.

During the last Parliament, he and Steve Hilton, the prime minister's one-time adviser, supported the charity's call for funds within Whitehall in 2011.

Officials in the Department for Education report that Downing Street was in favour of funding the charity. Michael Gove, then education secretary, and Tim Loughton, then children's minister, opposed giving grants to the charity.

Last week, the police opened an investigation into serious allegations of incidents involving young people who use the charity that were not passed on to the police. The charity says it always meets its obligations to report crimes.

Watch more on this story on Newsnight on BBC iPlayer