VIENNA, Austria -- Andy Murray continued his recent resurgence by winning his second title in three weeks at the Erste Bank Open on Sunday 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. "The third set, especially, was very back and forth so mentally it was quite a tough match. I just managed to be a little bit more consistent toward the end, a little bit more aggressive."

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).

"I am proud of winning 30 tournaments, it's nice," Murray said. "When you start, that's not something you really think about. I won my first one when I was 18. I know how difficult it is to win tournaments so I don't take anything for granted."

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 ninth 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.

"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 of Canada 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."