In an interview with a newspaper, Beckham said the Manchester United manager was a tower of strength as he dealt with national vilification. (Agencies)
The comments came after Ferguson said Beckham had become fame-obsessed and thought he was bigger than his boss.
Beckham was sent off in England's second round match against Argentina for kicking out at opponent Diego Simeone, in a game England went on to lose on penalties and go crashing out of the tournament.
The midfielder was demonised the following season with Beckham receiving death threats and being booed by away fans, while effigies were hung and torched.
But the midfielder came second in FIFA's World Player of the Year vote as he helped United to win the English Premier League, the FA Cup and the Champions League.
"Sir Alex was fantastic," Beckham said.
"He gave me huge strength with his support after the sending-off. The United fans were huge, too,” he said.
"In some ways, I am glad I went through it. It made me stronger. When people criticise you, it is not a reason to give up, but to work harder and believe in yourself," he added.
Describing the extent of his vilification, Beckham said: "Nothing could have prepared me for what happened.”
"When a guy broke into my back garden late at night to try to intimidate me, it was almost the last straw. There were death threats, too,” he said.
"Suddenly, I was one of the most hated men in the country. I remember the first away game at West Ham the following season, I had to be transported into the ground under a police escort. The faces surrounding the team bus were twisted with anger," he said.
In an interview with a newspaper, Beckham said the Manchester United manager was a tower of strength as he dealt with national vilification.