The decision clears the way for the side to carry on operating after Friday's cut-off date for paying the bill to Her Majesty's Revenue & Customs (HMRC), which would have led to a winding up order.
HMRC said the club can now pay in two instalments between now and December 3.
Hearts director Sergejus Fedotovas said "phenomenal" support from fans paved the way to the crucial agreement.
He said: "We are pleased we have been granted this extension as it acknowledges the strenuous efforts going on to ensure this club continues to contribute to employment, society, community and football in Scotland.
"I also want to acknowledge the support received from political and supporter groups. Their direct action is helping the club through a very important period.
"We have a lot of hard work ahead of us in order to fully rectify our financial position but with further backing and ongoing fundraising by supporters we know that we have a very positive opportunity to create a strong club for the future.
"Make no mistake, the fans and players have been instrumental in achieving this extension with HMRC.
"The supporters' efforts have been quite phenomenal. However, it is essential they continue all their work to assist us in meeting financial targets at the club."
A Scottish Government spokesman welcomed the agreement, adding: "Tonight's news will come as a relief to all fans of Hearts, but there clearly remain ongoing financial issues across Scottish football, and the Scottish Government remains ready to assist wherever it can in promoting initiatives such as open book accounting and more supporter involvement in the running of clubs."
The move came hours after Hearts rejected a bid by a consortium of fans to buy the club.
The Edinburgh club issued a scathing statement on its website last night confirming it had knocked back a note of interest from the Foundation of Hearts consortium fronted by local businessman Alex Mackie.
It said: "The proposal has no consideration of cash for the shares of the club, even if the debt is removed completely, and demonstrates a staggering misjudgment of the value of the club and a worrying lack of understanding of the situation.
"At best it is opportunistic, an attempt to exploit what is a difficult financial situation at the club. No evidence was provided on how the club would be operated and resourced after any potential purchase."
However, Mr Fedotovas said the club would continue to liaise with Supporters Direct, a government-backed organisation which aims to help fans own their clubs, over a possible fan buyout of the club from majority shareholder Vladimir Romanov.
Former Hearts player Gary Mackay said he had had a "wonderful" response to his 1874 fighting fund, with donations flooding in from former players and one from former Tottenham manager Harry Redknapp,
However, the club urged fans to make donations to the official telephone line as it emerged that around 10 organisations were now involved in seeking funds.
It comes as representatives from the 12 SPL sides are due to meet in Glasgow tomorrow to discuss a possible league restructure, which could see it incorporate an additional four clubs.
Meanwhile, Hibs stadium announcer Willie Docherty's sacking after he played The Beatles song Taxman has been criticised by a Hearts player. Ryan McGowan tweeted: "The world's gone mad."
l Dunfermline fans yesterday launched a campaign, Pars Alive, in an attempt to earn a greater voice in the running of their troubled club.