It was a close first set that was going with serve until Almagro broke to go 4-3 ahead. He attacked the Ferrer serve to bring up two break points, but needed just one.
Almagro was beginning to control the pace of the match, while also producing some dazzling shots, especially off his backhand. He was in inspired form and served out for a one-set lead.
Signs of frustration were beginning to show in Ferrer as he screamed at himself for making one uncharacteristic error after another.
Almagro earned more break points for a 3-2 lead, but again needed only one to tighten his stranglehold on the match.
After serving out for a two-set lead, he continued his dominance in the third set, although he was helped by more sloppy play from his compatriot.
Ferrer was holding onto his serve without much trouble, but could not make any inroads when Almagro had the ball in his hand.
The game looked to be heading one way as Almagro broke to love before serving for the match. However, the never-say-die attitude of Ferrer came to the forefront just when he needed it most.
He dug deep to deny Almagro and, all of a sudden, was finding winners from all over the court.
Ferrer kept the match alive by taking the third 7-5, but was broken early in the fourth and took his frustration out on the plexicushion.
The drama continued on Rod Laver with the fourth seed breaking straight back to love after scrambling to defend three straight smashes from Almagro.
The match was now living up to the hype, with both players taking it in turns to find spectacular winners. Service holds were at a premium though, as every time Almagro broke, Ferrer replied in kind.
Almagro was denied twice more as he served for the match in the fourth set, before Ferrer forced a deciding set by taking the tie breaker 7-4.
At the end of the fourth, Almagro was feeling his groin after an overhead smash. He called for the trainer, who stretched out his legs.
The 30-year-old was showing signs of battle weariness in the fifth set - the second one he has played at this year's tournament.
Ferrer went on to break Almagro twice on his way to a 6-4 6-4 5-7 6-7 2-6 victory in three hours and 44 minutes of rollercoaster tennis.