VIENNA (AP)—Andy Murray continued his recent resurgence Sunday by winning his second title in three weeks at the Erste Bank Open and boosting his chances of making the cut for the ATP finals.

The 11th-ranked Murray rallied to defeat David Ferrer 5-7, 6-2, 7-5 in a dramatic finish. The Scot lost a 2-0 lead in the deciding set but won four straight games from 5-3 down, ending the match with his ninth ace.

''It always feels good to win a tournament,'' Murray said. ''He deserved to win the first set, I deserved the second and the third could have gone either way. It's been a great week and I'm very happy.''

The second-seeded Scot, who improved to 30-14 in career finals, also won in Shenzhen in September to end a 14-month title drought.

Murray became only the fifth active player with 30 or more titles alongside Roger Federer (81), Rafael Nadal (64), Novak Djokovic (46) and Lleyton Hewitt (30).

The victory also boosted Murray's chances of getting to the eight-man ATP Finals in London next month. The Scot is in eighth position, one ahead of Ferrer, in the qualifying race to the prestigious season-ending event.

''Whoever qualifies for the finals, will deserve it,'' said Murray, who would reach the tournament for a seventh straight season, though he pulled out following back surgery last year.

Ferrer and Murray were 9th and 10th in the race to London before this week. They accepted a late invitation to the Vienna event and set up the first ATP final between two wild card entries since 2004.

Murray improved to 8-6 against Ferrer, who had beaten the Scot in Shanghai 10 days ago but said this time Murray deserved the victory.

''Andy Murray, in the important moments, he played better than me,'' Ferrer said. ''He has one of the best returns of the tour.''

Ferrer dropped behind Murray but overtook Milos Raonic in the qualifying race to the finals and said he was still confident of making it to London.

''Of course I have a chance, sure,'' said the Spaniard, who, like Murray, will play in Valencia next. ''There are two weeks more which are important for me ... Tomorrow I'll try to be more positive than now.''