West Ham co-owner David Sullivan has told the London Evening Standard that Rafa Benitez was "within three hours" of becoming the new manager at Upton Park before taking charge of Real Madrid instead.
West Ham parted company with Sam Allardyce at the end of last season and had hoped to bring in Benitez as his replacement after the Spaniard decided to leave Napoli.
However, the former Valencia, Liverpool and Chelsea manager then took the job at the Bernabeu and the Hammers appointed former Croatia coach Slaven Bilic -- once a West Ham player -- as their new boss.
Sullivan said: "Rafa Benitez was within three hours of signing for us.
"Every clause in his contract was agreed and then he went to Real Madrid. It was a real blow because he is a really experienced manager in England and had done really well in Italy.
"We had an agreement in place but you have to pick yourself up, look who else is available and pick the best you can.
"Whoever you take is a gamble. The bottom line is we have a manager. He has our 100 percent support. We will support him in the transfer market. We like him."
He said the uncertainty that had surrounded the future of Allardyce, who led West Ham to promotion through the playoffs in 2012, came from a desire to make the right decision as late as possible.
"It was very difficult," he said. "How would you have handled it? Do you think we should have announced he wasn't going to be there next year? That would have completely undermined him with the players.
"Should we have got rid of him earlier and brought a temporary manager in? That's not right either. What is the best way to handle it? Had he won the last five games, we might have tried to persuade him to stay."
Allardyce had West Ham in the top four of the Premier League at Christmas, but won only three of his final 21 games in charge of the east London club.