Hearts have confirmed the appointment of former manager Robbie Neilson on a three-year contract after they agreed a compensation package with Dundee United.
Neilson will return to Tynecastle for a second spell in charge, beginning on July 1, after guiding Dundee United to the Championship title last season following the curtailment of Scottish football due to the coronavirus crisis.
United say an approach for Neilson, who won the Championship with Hearts in 2015 in his first stint in charge, was initially rejected before the 40-year-old insisted he be able to speak to his former club.
Hearts are facing up to the prospect of playing Championship football next season after being relegated following the abandonment of last season - a decision they are challenging by taking the SPFL to court, and contesting Dundee United's promotion in the process - but that has not dissuaded Neilson from making a return to Gorgie.
He told the Hearts Website: "You don't turn down the chance to come to a club like Hearts and I'm absolutely delighted to be coming back.
"I had some great experiences here, both as a player and manager, and I'm keen to pick up where I left off. Everyone knows there is a really good squad at Hearts and I'm excited to begin working with the players and staff.
"Finally, I'd like to say thank you to Dundee United for the opportunity they gave me two years ago. I hope the United fans feel that together we managed to restore the club back to where it belongs."
Neilson's return to Edinburgh means former Barnsley manager Daniel Stendel will no longer be involved at Hearts. He was out of contract after the club's relegation due to a clause in his contract.
Hearts owner Ann Budge said she cannot thank Stendel enough for his devotion to the club, insisting he could have thrived under different conditions.
"While Robbie agreeing to come back is excellent news, it does mean we have to say goodbye to Daniel," she said.
"The uncertainties surrounding Scottish Football in general and Hearts' situation in particular, has put enormous pressure on all of us, not least Daniel.
"He has shown great patience and understanding throughout this enormously challenging time. I cannot thank him enough for the support he has given to our club.
"None of us expected our relationship to be so short-lived but then none of us ever expected to have to deal with the effects of a global pandemic. It is clear that all clubs are having to rethink their short-medium plans and we are no different.
"I do want to thank Daniel very sincerely for his fantastic support and leadership during his short spell with us. He made a big impact on our operation and we are much better for having had his services. Had it not been for Covid-19 and its impact, I have no doubt that Daniel would have had a very successful and enjoyable time here at Hearts.
"Daniel became a firm fans' favourite in a very short space of time. On behalf of everyone here at the club, the board, the staff, the players and, of course, the supporters, I want to wish him and his assistants, Jorg Sievers and Dale Tonge, the very best of luck for their future success. They will always be welcomed back here at Tynecastle."
Last week owner Budge said she intended to appoint a sporting director before a new manager or head coach. The club remain intent on appointing a sporting director as soon as possible, and are interviewing for the position this week.
"The news that Robbie is to return to Hearts has taken everyone somewhat by surprise," Budge added.
"It was my stated intention to prioritise the appointment of a sporting director, prior to confirming any new manager appointment. However, in all businesses, even 'the best laid plans"' may have to be altered to cope with changing circumstances."
Dundee United sporting director Tony Asghar revealed his club were keen to keep Neilson at Tannadice ahead of their return to the Premiership next season but said terms were agreed with Hearts after Neilson asked to speak to his former club.
Asghar said: "I can confirm that I was called today by Ann Budge seeking permission to speak with Robbie Neilson to become Hearts' new head coach.
"This was turned down, however, after lengthy discussions with Robbie he made it clear he wished to speak with them. As a result of this, the contractual termination clause has been met and Robbie will leave the club.
"As head coach, he led the team to a play-off final before achieving promotion with a Championship title this season and I would like to thank him for his contribution.
"Gordon Forest and Lee McCulloch will continue leading our pre-season preparations ahead of the Scottish Premiership restart and we will look to appoint a new head coach as soon as possible."
Neilson started his playing career at Hearts, winning the Scottish Cup in 2006, before spells at Leicester and Dundee United.
He left his first spell in charge at Hearts in December 2016 to take over at MK Dons but was sacked in January 2018 before returning to Scotland to take over at Dundee United.