The former Barcelona keeper, who joined Belgium club Standard Liege on loan in January, moved to United in January 2015 when he was out of contract, as possible cover for compatriot David De Gea, but could make only two appearances.

“You can’t imagine how delighted I am because it’s not usual to bring players like him to recently promoted teams,” head coach Aitor Karanka told the club’s website.

“I’m really pleased because he is really committed. All the conversations we’ve had he knows why he is here and he is coming to add to what we have.”

The 34-year-old made over 500 appearances for Barcelona where he has won three Champions League trophies and six La Liga titles.