Ding Junhui became the first player to win the Shanghai Masters twice by beating Mark Selby 10-6 in the final.

On the tenth staging of the tournament in China, fittingly it was the home favourite who lifted the trophy as he gained a measure of revenge against Selby for defeat in the World Championship final in May.

It’s Ding’s first ranking title in two and a half years and the 12th of his career, bringing him level with Neil Robertson. Only five players in snooker history have won more. The 29-year-old from Yixing receives the top prize of £85,000 and jumps three places in the world rankings to sixth.

Ding’s first Shanghai crown came in 2013, initiating a run of three consecutive ranking titles. He went on to win five during the 2013/14 season, matching a record set by Stephen Hendry. The Chinese cueman subsequently suffered a loss of confidence and a long barren spell, but regained form at the end of last season, reaching the Crucible final for the first time before an 18-14 loss against Selby. After skipping two of the first three tournaments this season, he regained sharpness in winning the Six Red World Championship in Thailand earlier this month and now, ominously for his rivals, looks back to his best.

Selby was denied back-to-back ranking titles having won last month’s Paul Hunter Classic but still wins £35,000 and tightens his grip on the world number one position.

Leicester’s Selby led 3-1 early in today’s final with top breaks of 74 and 108, Ding’s only response coming with a 115 in frame two. Ding then seized control by reeling off the last five frames of the opening session to lead 6-3, firing runs of 53, 59, 52 and 75.

Selby hit back at the start of the evening session, knocking in 76, 102 and 53 to level at 6-6. But it was Ding who proved stronger in the home stretch, making 97, 52 and 63 to lead 9-6. A run of 46 put him in control of frame 16, and Selby’s battle to gain the snookers he needed on the last red proved unsuccessful.

“I feel like I’m back to where I was in 2013,” said Ding. “It’s special to win back to back tournaments.

“I felt so strong in the last frame. Mark was coming back at me and he is so strong in safety so he was trying to get snookers. He made every shot so difficult for me, I was just trying to hit the red, that’s it.

“This is a special tournament in Shanghai, it was been going since 2007 and I have learned a lot from it. I’m always very happy to win anywhere in China.”

Selby said: “I’m disappointed to lose but I’d rather lose to Ding than anyone else here, especially on the tenth anniversary of the event. He’s one of the game’s great players. He has been through a lot of emotion on and off the table so all credit to him for showing great character.”