Roger Federer defeated long-time rival Rafael Nadal 6-3, 5-7, 6-3 Sunday to win his seventh title at the Swiss Indoors as he played his home final for a record tenth consecutive year. Federer and Nadal last met in an Australian Open semifinal nearly two years ago and played their last final in Rome in 2013, both of which Nadal won. The 34-year-old Swiss, world number three behind Novak Djokovic and Andy Murray, claimed the 88th title of his career. The Basel trophy was his sixth of the season as he polished his record to 58-9. "Rafa had a great week," said Federer who finished with 12 aces and 44 winners. "It was special for us to have had this match and I hope we play many more finals. "To win this one is incredible, a match with Nadal is always special. It was very important for me." Federer's victory was his 11th against Nadal, who still holds the upper hand with 23 wins. The win in two hours in front of a charged-up crowd at the St Jakobshalle gave Federer his first victory over the Spaniard since his triumph in the semi-finals of the 2012 Indian Wells Masters, ending a five-match winning streak by the Spaniard. Nadal had won 14 of their previous finals, with Federer claiming six. But the Swiss has now improved to 5-1 against Nadal on indoor surfaces. "It's still been a fantastic week for me. It's my fourth time here and I finally reached the final," said 29-year-old Nadal. "It's been a very emotional week also. I had to fight in a lot of my matches. But it's been a very important time both now and for the future (season). "I've had huge support all week — maybe a bit less today, but I understand," he joked. Federer got away to a good start at the venue where he served as a ballboy two decades ago. The top seed earned a break for 3-2 and concluded the opener with a second break to take the lead after 37 minutes. But Nadal, who has been making comebacks all week, was having none of it. With Federer on a roll, the Swiss won the fifth game with three aces and fired his ninth ace to secure a 5-4 lead. Nadal earned a break point in the next game and converted to shock the Swiss with a 6-5 lead. The Spanish third seed quickly leveled the match at a set each on the first of three set points. Federer came alive just in time in the final set, breaking for 5-3 and serving out for victory a game later on his second match point. Sousa ends 2015 finals jinx Joao Sousa ended a run of three consecutive defeats in finals this year when the unseeded Portuguese fought back to beat Roberto Bautista Agut 3-6, 6-3, 6-4 and claim the Valencia Open title Sunday. Sousa, who has lost finals in Switzerland, Croatia and Russia in 2015, secured his second career title when he converted four of his five break points to upset seventh-seeded Bautista Agut in front of his home crowd. The Spaniard, appearing in a second final in as many weeks having lost to Croat Marin Cilic at the Kremlin Cup in Moscow last weekend, needed treatment after Sousa leveled the match at one-set all on the indoor hard court.