Former Wales hooker Jonathan Humphreys has been appointed Scotland forwards coach, the Scottish Rugby Union has confirmed.

The 44-year-old will leave a similar position at Ospreys at the end of the season to take up his new role after signing a two-year deal.

He will replace former England forward Dean Ryan, who quit his Murrayfield post after a short-term stint working with interim Dark Blues head coach Scott Johnson during this year's RBS 6 Nations.

Humphreys will join the Scotland management team ahead of the quadrangular tournament with Samoa, South Africa and Italy in June.

He worked with Johnson for a spell when the Australian was employed by Ospreys as director of rugby from 2009 before moving to Scotland to assist former head coach Andy Robinson last year.

Humphreys said: "I'm very excited by the challenge of working with the Scotland players and management and building on the very solid foundations that are in place.

"I know Scott well from our time together at the Ospreys and it will be great to renew acquaintance with a man who has such a sharp rugby brain."

The former Cardiff and Bath forward, who won 35 caps for Wales in an international career that also saw him selected for both the 1995 and 1999 World Cups, was appointed forwards coach at the Ospreys in 2005.

During his tenure with the Swansea club, Humphreys helped them claim a record three RaboDirect Pro12 titles as well as the EDF Energy Cup in 2008, but said he was leaving the club with a "heavy heart".

Of the 23 forwards named by Wales in the lead up to this year's Six Nations, eight worked with Humphreys at Ospreys.

He added: "I would like to take this opportunity to thank the Ospreys for everything they have done for me. They gave me the opportunity to coach at the top level and have stuck by me through a lot of change and upheaval.

"The organisation has helped me develop and has been determined to get me the best experiences possible to try and make me the best coach that I can possibly be. They have always been unflinching in their support of me and for that I will always be extremely grateful to everyone at the region.

"I'm extremely proud of the trophies that we have won but I am even more proud of the players that we have developed to represent Wales and the Lions. I feel extremely fortunate to have coached the calibre of player that I have had at my disposal and to see them grow to go on to play international rugby.

"It's been a tough decision to leave because of the people I work with, but I am sure success will always follow the Ospreys with the systems and structures in place."

Scottish Rugby's chief executive Mark Dodson is delighted with Humphreys' appointment, saying: "Jonathan impresses us. He's a very astute coach and when you look at the players he has nurtured to the very highest levels of the game then clearly he has much to offer."

Ospreys chief operations officer Andrew Hore, meanwhile, paid tribute to the departing coach.

"Jonathan has been a tremendous servant to the Ospreys, his home region, playing a big part in our successes over the last eight years," he said.

"We have developed a strong reputation for our forward strength and Jonathan has been instrumental in that, playing a part in the development of so many forwards who have gone on to represent Wales and the Lions."

The SRU is still in talks with Johnson about making his position permanent after the 50-year-old guided Scotland to a joint third-place finish in the Six Nations.