Hearts expect to name John McGlynn as their new manager within the next few days, BBC Scotland has learned.
Raith Rovers have given their boss permission to speak to Hearts after an official approach was made this week.
The 50-year-old previously worked as a coach at Tynecastle and twice stepped in as caretaker manager in 2005.
He took up the Raith post the following year and is now in line to replace
Paulo Sergio, who left Hearts earlier this month.
A Raith spokesman said: "Raith Rovers FC announces that Heart of Midlothian FC have formally sought permission to speak to John McGlynn regarding the vacant manager's position at Tynecastle.
- Played as midfielder for Berwick Rangers
- Also had playing and management spells in junior football
- Began coaching at Hearts in 1996, working with youth team and eventually first team
- Had two spells as caretaker manager following departures of John Robertson and George Burley
- Became Raith Rovers manager in 2006
"The board of directors has an excellent relationship with John and has no wish to stand in the way of his career progression should an opportunity arise for him.
"Accordingly we have acceded to Hearts' request."
Sergio's only season in charge ended with a 5-1 victory against Edinburgh rivals Hibernian in the Scottish Cup final.
The Portuguese rejected the offer of a new contract, a deal he described as "unacceptable".
McGlynn led Raith to the Scottish Second Division title in 2009 and the Scottish Cup semi-finals the following year.
The Kirkcaldy club challenged for the 2010/11 First Division championship but eventually lost out to Fife rivals Dunfermline.
However, McGlynn won that season's PFA Scotland manager of the year award.
Last season, the Stark's Park side finished seventh.
McGlynn spent 10 years at Hearts as a youth coach before being promoted to work with the first team.
He has always been held in high regard by those in power at Tynecastle and, over the past few seasons, a number of the club's youngsters have been farmed out on loan to Raith Rovers to develop their careers.