Manchester United have completed the purchase of Nemanja Matic from Chelsea for £40m on a three-year deal, with an option to extend for a further year.

José Mourinho expressed his delight at signing the midfielder by telling United’s website: “Nemanja is a Manchester United player and a José Mourinho player. He represents everything we want in a footballer: loyalty, consistency, ambition, team player.

“I would like to thank him for his desire to join us because without that it would be impossible to have him here. I am sure our players and supporters will love him. A big welcome to our new No31.”

Matic’s signing represents a significant boost to Mourinho after United failed in their efforts to purchase Eric Dier from Tottenham Hotspur. Juventus were also keen on Matic but the player, who will be 29 on Tuesday, preferred a move to Old Trafford and being reunited with Mourinho. He was a key component of Chelsea’s title-winning team in 2014-15 after being brought back to the club in January 2014. Chelsea were particularly keen to drive a hard bargain with United after missing out to them over the signing of Romelu Lukaku.

Matic said: “I am delighted to have joined Manchester United. To work with José Mourinho once again was an opportunity I couldn’t turn down.

“I have enjoyed my time at Chelsea and would like to thank the club and the fans for their support. I cannot wait to meet my new team-mates and to start training with them.This is a very exciting time for the club and I am looking forward to playing my part in creating more history for this great club.”

Matic’s Stamford Bridge exit had long been expected after the Chelsea manager Antonio Conte signed the France international Tiemoué Bakayoko from Monaco in a £39.7m deal last month. A picture circulated on Twitter purporting to show Matic in United training kit and wearing No31, which has been vacant since the departure of Bastian Schweinsteiger. Chelsea had left Matic out of their tour to Asia to allow him to finalise a move.

He becomes United’s third signing of the summer following a £31m deal for the defender Victor Lindelof and the £75m move for Lukaku from Everton. The Serbian could make his debut against Sampdoria in Dublin on Wednesday or in the Uefa Super Cup against Real Madrid next week.

Matic was a key component of Chelsea’s title-winning team in 2014-15 after Mourinho brought him back to the club from Benfica for £20.75m.