Former Scotland international Gregor Townsend will replace Sean Lineen as head coach of Glasgow Warriors at the end of the current season, the Scottish Rugby Union has confirmed.
Lineen will now move to a new role as the SRU's head of player acquisition.
The role will be Townsend's first in club rugby, coming after his time as Scotland's attack coach.
The 38-year-old has come in for criticism for his part in the national team’s poor Six Nations campaign, which has seen Scotland suffer four straight defeats.
Townsend’s future as Scotland’s attack coach had been unclear after it was announced Scott Johnson would take up the post of assistant to Andy Robinson in the summer.
However he said the chance was too good to turn down. He said: "I'm honoured and genuinely thrilled to have been given this opportunity. Glasgow Warriors are a team on the rise, and I'm thoroughly looking forward to bringing my own influence and insights to that structure."
Lineen, who has been in charge of the Warriors since 2006, admitted he was disappointed to be leaving the club but said he was glad to have been offered another role within the governing body.
The Firhill-based side sit in fourth place in the RaboDirect PRO12 table and the former Scotland international insists he will keep his players motivated until the end of the season as they bid to reach the play-offs.
Warriors captain Al Kellock backed Townsend to carry on Lineen's success but admitted he was sorry to see the club lose such an influential coach.