Hearts are confident Daniel Stendel will be well worth the wait as they look forward to a new era at Tynecastle.
Stendel was confirmed as the club's new manager about an hour after Hearts fell to a 1-0 defeat at Motherwell which left them level on points with the Ladbrokes Premiership's bottom two, Hamilton and St Johnstone.
The Gorgie club had been involved in protracted negotiations with Stendel and Barnsley, who demanded compensation despite removing the German from his position as manager two months ago.
A Hearts statement read: "While it has taken some time for this process to reach its conclusion we firmly believe that Daniel is the right man to take the club forward.
"With our number one target now on board and his future pledged to Hearts, everyone at Tynecastle Park welcomes Daniel and hopes his appointment heralds an exciting new era for the club as, together, we look to climb back up the Ladbrokes Premiership table."
The 45-year-old led Barnsley to promotion from League One in his only full season in Yorkshire – Hearts emphasised his feat in finishing ahead of a Sunderland side then managed by recently-appointed Hibernian boss Jack Ross.
Stendel had previously spent almost a year in charge of Hannover 96, being appointed in April 2016 as they headed towards relegation from the Bundesliga, and leaving in March the following year before they sealed promotion.
He takes charge of a team who have been in free fall since October last year, when they topped the table but could not withstand a string of injuries with Steven Naismith's knee problem the final straw.
Naismith has missed much of this season too, sitting out the Fir Park defeat with a different hamstring injury to the one he suffered in August.
He will also have to lift his side's confidence – they have only won six league games in 2019 and the high-press, high-energy game his Barnsley team played might not be so easy to implement midway through a season.
Motherwell had earlier taken the lead in the 40th minute when Christopher Long swept home Jermaine Hylton's cutback and had a second wrongly disallowed for offside when Allan Campbell netted from close range.
The victory was Motherwell's third in eight days and lifted them above Aberdeen into third place in the table.
Manager Stephen Robinson said: "We set a target of nine points after losing two games, and we have managed to win three and not concede any goals.
"We are third now and there's a long, long way to go in the season, we have to temper expectations a little bit. Our aim first and foremost is to get enough points to stay in this division and then we will look where we are."