Argentina's Leonardo Mayer upset top-seeded David Ferrer of Spain 6-7 (3), 6-1, 7-6 (4) in the Hamburg Open final on Sunday to win his first ATP title.