David de Gea’s proposed transfer from Manchester United to Real Madrid appears to have collapsed at the last minute.

United and Madrid had agreed a deal worth £29 million for the sale of the Spanish goalkeeper, with Keylor Navas coming to Old Trafford as part of the agreement. But Press Association Sport understands the necessary paperwork was not lodged in time with La Liga, and the deal has therefore almost certainly fallen through.

Press Association Sport understands the 10-time European champions are still trying to resuscitate the deal but as it stands, de Gea will remain a United player until January at the earliest.

SEE MORE: Reports: David de Gea signs for Real Madrid; Keylor Navas moving to Manchester United.

United insist they uploaded the requisite documents to FIFA’s Transfer Matching System before Monday’s 11 p.m. deadline.

Sources at Old Trafford have rejected reports in Spain that they submitted their paperwork after the deadline and claim they have a time-stamp from FIFA as proof.

There was no mention of de Gea or Real Madrid goalkeeper Keylor Navas, said to be moving to Manchester, in a round-up of deadline-day transfers on La Liga’s official website, which was published after 11 p.m.

The dramatic 11th-hour collapse came as a huge shock to Madrid, who were determined to sign de Gea this summer.

The two-time United player of the year himself was determined to complete his return to Madrid this summer.

The 24-year-old, who joined United from El Real’s neighbor Atletico Madrid four years ago, hails from the Spanish capital, and his pop star girlfriend Edurne Garcia also lives in the city.

With just one year left on his contract, Madrid thought they could sign the Spain international for a relatively modest fee.

SEE MORE: Up-to-the-minute transfer deadline deals.

United had other ideas, however. After receiving a tentative enquiry from Madrid earlier in the summer, executive vice-chairman Ed Woodward told the Spanish club he would only entertain the idea of selling de Gea if United received defender Sergio Ramos in return.

Once Ramos renewed his contract with Madrid, United then demanded £32.6 million, which would have been a world-record fee for a goalkeeper.

Louis van Gaal left de Gea out of his squad for the first six matches of the campaign, claiming the player had lost focus due to Madrid’s interest in him. The manager then decided to sanction the sale of De Gea, provided Woodward brought Navas, the Costa Rica goalkeeper, to Old Trafford as part of the deal.

All things pointed to de Gea joining Madrid on deadline day but after this latest twist, it looks like he will see out the final year of his deal at United.