Maria Sharapova has clinched her first WTA title since returning from a drugs ban after beating Aryna Sabalenka to win the Tianjin Open, while Roger Federer defeated Rafael Nadal in the final of the Shanghai Masters.

Sharapova, a tournament wildcard who made her comeback in April, defeated the Belarusian teenager Sabalenka 7-5, 7-6 (8) on Sunday to secure her first title since she won the Italian Open in May 2015.

The five-times grand slam champion trailed the world No102 Sabalenka 4-1 and 5-1 in the first and second sets. But the 30-year-old Russian, who did not drop a set en route to the final, fought back on each occasion to claim her first title in 29 months.

Sharapova served a 15-month ban after she tested positive for the banned substance meldonium. The former world No1 was denied a wildcard for the French Open, before missing Wimbledon through injury. She was granted a wildcard for the US Open and reached the fourth round before losing against Latvia’s Anastasija Sevastova.

In Shanghai, Federer delivered a masterclass to defeat the world No1 Nadal in one hour and 12 minutes for a 6-4, 6-3 that secured his sixth title of the year. The 36-year-old broke Nadal’s serve in the opening game of the final and never looked back to claim his fourth victory against his rival in as many matches this season.

Facebook Twitter Pinterest Roger Federer now has five consecutive wins against Rafael Nadal. Photograph: Yifan Ding/Getty Images

Federer was made to work for his place in the final on Sunday after coming through a tough test against Argentina’s Juan Martín del Potro in the semi-finals. But there were no such problems for the world No2 against Nadal and his early break set the tone for a crushing win.

The Swiss secured his early service hold with three aces and an unreturned serve before winning the opening set in 35 minutes. He then broke in the fifth game of the second set after Nadal pushed a backhand wide. Federer, the 19-times slam champion, held to love in the ensuing game before sealing his 94th career title with his third break of the match.

“I played a great match today with hardly any mistakes,” said Federer, who has now secured five consecutive victories against Nadal for the first time in their long-standing rivalry. “It was very clear for me how I had to play and I was able to do it for the one hour and 12 minutes that I was out there.

“I started perfectly and kept the pressure on before creating more opportunities on the return, stayed on the offensive, and then also pull back at the right times to make sure Rafa could make some errors on his own and that is exactly what happened.”

Federer is the only man who can stop Nadal, a winner of this year’s French and US Open championships, from ending the season as world No1.

Speaking to Sky Sports, Federer said: “I am actually surprised that I have won here – with all that has happened since Montreal with my back – it is just nice to see that I am back again.

“London is my priority now and I really want to win the World Tour Finals. I am very excited to have had the year that I have had and everything that comes from here is a bonus. Finishing the year as world No1 is a long shot, and I don’t think it will happen but if I play like this, who knows? Maybe I will get close again.”