Ukip is in serious financial difficulties after it “lost control” of its finances during the general election campaign, The Independent on Sunday can reveal.

A funding gap of more than £500,000 may force the party to abandon its headquarters in central London in a desperate bid to avoid missing a legal deadline to settle all of its election expenses.

The IoS understands that Nigel Farage, Ukip’s leader, told an emergency meeting of the party’s National Executive Committee that Ukip would need to be bailed out by donors or take a loan to avoid legal action from the Electoral Commission.

According to a senior Ukip source, the party’s leaders heard that there is a “gaping hole” in its election accounts of “many hundreds of thousands of pounds” and that the party was delaying the payment of non-election bills and staff expenses to tackle the shortfall. The source said: “There was a massive overspend during the election and there is now a massive hole we have got to fill. Unfortunately we didn’t discover this until after the event.

“Huge amounts of election spending were commissioned; we are talking about hundreds and hundreds of thousands of pounds, with no money in the kitty to pay for it.”

The source said that the party is “100 per cent confident” that a loan or “an act of generosity” from a major donor would avert enforcement action from the Electoral Commission, but that the overspend had “created a massive problem” for the anti-EU party.

In either case, the party is struggling to maintain its Mayfair office, which has been provided free of charge by Ukip donor Andrew Reid, a millionaire lawyer and close political ally of Nigel Farage, who has given generously to the party.

The former Tory first gave the party use of the space on Brook’s Mews near to the exclusive Claridge’s hotel in 2013. But the party is now understood to be planning to move amid suggestions it cannot afford the “astronomical” business rates for the property. Mr Reid declined to comment.

Ukip has until 6 July to pay all of its election invoices, unless it can get an extension from the High Court, otherwise an offence is committed under the Political Parties, Elections and Referendum Act 2000. The penalty for failure to comply with the rules range from a warning to a fine of up to £20,000.

As well as moving office, the senior Ukip source said, the party is being forced to “prioritise” election expenses over ongoing expenses and costs, resulting in some suppliers and staff being left waiting for payment. Two other Ukip sources confirmed this to The IoS.

The senior source added: “It’s not that bankruptcy is a problem because we have 50,000 members paying subscriptions … but the big problem is that by law we’ve got to get the money in the next two weeks.”

The revelations over Ukip’s financial difficulties come after a tumultuous week for the anti-EU party. On 19 June it was forced to deny claims that deputy chair Suzanne Evans had been sacked, after a damming internal party email was leaked to the BBC. Reportedly sent at the behest of Mr Farage, it barred her from press appearances.

The incident was quickly labelled an “unsacking”, much like Mr Farage’s much ridiculed decision to renege on his promise to step down as Ukip leader was branded an “unresignation”. Last night a party spokesperson said the email was sent by someone “without property authority” and leaked with “mal-intent”.

Ms Evans told The IoS that she was “unaware” of the emergency meeting and was “not privy” to party finances, but she agreed it was likely that Ukip’s coffers were “fairly bare”.

She said: “I do know about the situation with the office. The space was lent to us by Andrew Reid because at the time he was renovating the building. On that basis he couldn’t let it out [commercially], so he let us have it. I suspect that when the building was finished, as it is now, we would have to move out anyway.

“I do know that the business rates are astronomical, so it would certainly make sense to find a more cost-effective building. I certainly wouldn’t criticise the party for that.”

Questions over Ukip’s finances follow a stand-off last month between senior party figures and Douglas Carswell, the party’s only MP. Mr Carswell refused the majority of £650,000 in state funding, known as Short Money, to the dismay of the party leadership. The money caused a split within Ukip amid calls for Mr Farage to stand down as leader. However, the senior Ukip source said the Short Money issue was a “red herring” as it could not be used to cover outstanding election expenses. The source added: “It will be tough, but we will get through this.”