Gloucestershire have signed spinner Tom Smith from Middlesex on a three-year deal.
Left-armer Smith, 26, spent much of the past season on loan at Gloucestershire, whose coach John Bracewell has moved to secure him on a permanent basis.
Bracewell said: "I am delighted Tom has agreed to sign a contract. We are pleased with the progress he has made since joining us and the all-round skills that he is starting to show.
"He controls the scoreboard when he bowls in all forms of the game and I rate him highly. His batting has been somewhat neglected in the past, but he has played a number of promising innings for us and will be useful in that respect too."
Smith said: "I am really excited about joining Gloucestershire permanently. It has been a great three months on loan and to be staying here for the next three seasons is a fantastic challenge for me.
"I have thoroughly enjoyed my loan time and to have the opportunity to join this young and exciting squad was a easy decision to make.
"I would like to thank all the coaches, players, staff, supporters and, most importantly, Angus Fraser at Middlesex for all the support they have shown me over the past four years at the club.
"It has been an amazing journey at the club and I would like to wish the squad all the very best in the future."
Middlesex boss Fraser said: "Releasing a player is never easy, but everyone at Middlesex is delighted that Tom is able to continue his cricket career at another county.
"Tom is a cracking young man and a good cricketer, and it has been a pleasure to work with him during the past four years.
"The continuous progress made by Ravi Patel, who we rate very highly, has reduced Tom's chances to play for the First XI and he is at the stage in his career where he needs to be playing regular First XI cricket.
"Everybody at Middlesex wishes Tom success at Gloucestershire and he will always be welcome at Lord's."