Gary Locke has been appointed manager of Hearts on a permanent basis, the club have confirmed.
Former Dundee United boss Peter Houston had been linked with the role, but Locke has agreed a deal until the summer of 2014, while Edgaras Jankauskas and Darren Murray will continue in the role of assistants.
Director Sergejus Fedotovas said: "We considered several people for the job and were close to making an appointment of what we believed to be the best of outside candidates but it was Gary Locke who scored more points among the board members.
"Now I believe that it is right that Gary, Edgaras and Darren continue to be given an opportunity to build on the work they have begun.
"Gary clearly has the same desire as a coach that he showed as a player for the club and with the support of Edgaras, Darren and the players he has an opportunity to deliver success to the club.
"Our decision provides certainty to everyone through to the end of next season and reinforces the focus we all have in trying to achieve a special chapter in the history of this club on Sunday."
Locke has enjoyed a 14-year spell at the club as both player and coach and will lead them out at Hampden on Sunday when they tackle St Mirren in the League Cup final.