Manchester United have agreed an 18-month contract with former Barcelona goalkeeper Victor Valdes.

The club are set to announce that the 32-year-old has signed on at Old Trafford as understudy to David de Gea.

Valdes has been training with Louis van Gaal’s squad for the last two months as a free agent as part of his recovery from a serious knee injury.

Victor Valdes (centre) watches Manchester United play Chelsea at Old Trafford back in October

Valdes (left) works out, wearing a Red Devils snood, with United's first-choice keeper David de Gea

The Spain keeper has agreed an 18-month deal with United as he bids to return to action after injury

Valdes was recovering from injury and has not played since last March

Former Barcelona keeper Valdes' attitude has impressed staff and players at United

United manager Louis van Gaal has said little about his plans for Valdes but has been impressed enough in recent weeks to offer him a deal.

Valdes’ arrival will give De Gea proper competition at Old Trafford for the first time. Current No 2 Anders Lindegaard is not considered good enough by Van Gaal.

The signing of Valdes will inevitably lead to more talk about De Gea’s future.

United have not been able to get the young Spaniard’s name on a new contract and Real Madrid are keen to have the 24-year-old as a long-term replacement for Iker Casillas.

Valdes is currently living in the Lowry Hotel in the city centre but is believed to be looking for property in the same area as his compatriots De Gea, Juan Mata and Ander Herrera.

Valdes will also bring his family to live with him in Manchester.

United are looking to let Lindegaard return to Scandinavia while they will not stand in the way of fellow keeper Ben Amos should a club come in for him.

Goalkeeper Anders Lindegaard (left) could be allowed to return to Scandinavia

United say they won't stand in the way of Ben Amos (right) should another club come knocking

United have told the former England Under 21 international that they will not stand in his way if he receives other offers. Lindegaard, meanwhile, has been linked with Molde.

The 30-year-old Dane almost left Old Trafford last summer when Van Gaal made an unsuccessful attempt to hijack Kenneth Vermeer’s move from Ajax to Feyenoord with a player-plus-cash bid.

Lindegaard has since drifted out of contention as a serious rival to De Gea and has not played at all this season. It was thought he might have been called up for Sunday’s FA Cup tie at Yeovil but Van Gaal left him on the bench again.