The Spaniard was able to convert one of two break opportunities in the opening stages, which was enough to seal the first set in his favour.
However, the Czech was able to respond in the second set, in which he doubled Almagro for winners and hit nine aces en route to a 7-5 tie-break win.
Berdych took his momentum into set three, breaking his opponent for the first time to take a two-game lead. However, the tenth seed struck back to tie the set at four games all and force another tie-break. Once again, the Czech came out on top.
Both men held serve throughout the final set, but a more efficient approach from Berdych allowed him to seal his third straight tie-break and progress from the fourth round.