(CNN) -- Serena Williams retained her U.S. Open title with a hard-fought 7-5 6-7 6-1 victory over Victoria Azarenka in a gripping final at Flushing Meadows Sunday.
The world No.1 was thoroughly extended by Azarenka before clinching her 17th grand slam crown in two hours 45 minutes of enthralling action on a windswept Arthur Ashe Stadium Court.
Williams, who twice served for the championship in the second set, made no mistake at 5-1 in the decider, taking advantage of her second match point when her opponent from Belarus hit long.
It ended brave resistance from the second seed, who had trailed by two breaks of service in the second set before hitting back to win a tense tiebreaker 8-6.
Fifth title in New York
But Serena was not to be denied her fifth U.S. Open title, opening up a double break advantage in the third set, which this time she was not to relinquish.
At 31 she is the the oldest winner of the hard court grand slam in the Open era, and the American acknowledged just how tough a match she had been given.
"Victoria you played unbelievable," Williams said. "What a great match and a great person. It's an honor to play against you." she told the crowd after winning her second grand slam title this year, having also lifted the French Open in June.
Azarenka, beaten by Williams in the final in New York for the second straight year, admitted a second defeat was hard to take.
"It's a tough loss but being in the final against the best player, who deserves the win, it's incredible," the Australian Open champion said.
"I gave it everything I had. I fought hard but well deserved. Congratulations Serena."
Williams picked up a check for $3.6 million, including a $1 million bonus for winning events in the build-up to the final slam of the season -- though she lost to Azarenka in the Cincinnati final last month, just one of four defeats for her in 2013.
She is the first woman to successfully defend the title since Kim Clijsters in 2010, and was runner-up in the 2011 final in New York.
Williams had lost only 16 games in six matches as she cruised to the final, but Azarenka was made of sterner stuff and after dropping her service in the very first game, immediately broke back to set the pattern of the final.
Williams finally broke through again in the 11th game and served out for the opener, but hopes of a straight sets victory were dashed by another stirring Azarenka fightback.
Williams looked on the verge of tears after her failure to close out the match and threw down her racket in frustration as Azarenka leveled at one set all.
But great champion that she is, Williams quickly regained control to the delight of the 20,000 spectators on the show court.
Earlier Sunday, Leander Paes became the oldest man to win a grand slam title when he paired with Radek Stepanek to win the men's doubles title.
The 40-year-old Indian and his Czech partner, the fourth seeds, beat Alexander Peya of Austria and Brazil's Bruno Soares, the second seeds, 6-1 6-3.
Paes and Stepanek were winners of the 2012 Australian Open title and had ended the hopes of top seeds Bob and Mike Bryan, who were hoping to complete a calendar year grand slam, in the semifinals.
Paes had won the U.S. Open title with Martin Damm in 2006 and Lukas Dlouhy in 2009, and now has eight men's doubles trophies at the majors as well as six mixed doubles crowns.
"I think the best advice I can give to anyone for doubles is get a partner from the Czech Republic!" Paes told the official tournament website.
"Radek helped me to get to be the oldest man to ever win a grand slam in the Open era. I thank him for that, and we are definitely not done. I'm going after 41 now, 42, and then 43."
On Monday, top seed Novak Djokovic and second-ranked Rafael Nadal battle for the men's title.