Walter Smith has been appointed manager of Rangers for a second time.
He has quit his post as Scotland head coach to return to the job he gave up in 1998 and has signed a three-year contract.
The Scottish Football Association have confirmed their intention to take legal action against Smith “for breach of contract” and against Rangers “for inducement to breach the contract”.
David Taylor, SFA chief executive said: “Walter’s departure is a serious blow to the Scottish FA.
“He has done an excellent job for us and the Scottish national team. We are very disappointed that he has chosen to leave us at this critical time in our Euro 2008 qualification campaign.”
In a statement, the SFA said: "At a meeting this morning with the chief executive of the Scottish FA, Walter Smith delivered a letter of resignation with immediate effect from his position as national coach of the Scotland team.
“No agreement has been reached with Mr Smith or Rangers Football Club on any compensation payment to be made for the early termination of his employment, which is in breach of his contract with the Scottish FA.”
Smith was Rangers executive chairman Sir David Murray’s first choice for the position from the moment Paul Le Guen left the club by mutual agreement six days ago.
The 58-year-old Glaswegian led Rangers to seven consecutive league titles before departing for a stint at Everton, which was much less successful.
He had previously served as assistant boss at Ibrox under Graeme Souness.
Smith brings Rangers legend Ally McCoist with him as his assistant, while Kenny McDowall has been recruited from Celtic and will serve as first-team coach.
Almost nine years have passed since Smith left Rangers.
With the current team in a state of turmoil, he will initially be tasked with stopping the rot rather than mounting an immediate challenge to Celtic in the Bank of Scotland Premier League.
Smith enhanced his reputation with Scotland who surprisingly top their Euro 2008 qualifying group, ahead of Italy and France, the two World Cup finalists.