(CNN) -- Serena Williams battled back from the brink of defeat to claim her 15th grand slam title and win the U.S. Open for the fourth time with a 6-2 2-6 7-5 victory over world No. 1 Victoria Azarenka on Sunday.
The American added to her 2012 Wimbledon and Olympic crowns after being pushed to the limit by the Australian Open champion, who forced the 30-year-old to drop her first set of the tournament.
"I honestly can't believe I won. I was preparing my runner-up speech because she was playing so well," Williams said courtside after the match, which lasted two hours 18 minutes.
"I'm so shocked. It's remarkable."
It was the first time in 17 years that the women's final went the distance in New York, and it ended Azarenka's run of 12 successive victories in matches lasting three sets.
"Serena deserves to win. She showed how true a champion she is," Azarenka said. "I definitely gave it all today. Stepping off this court I will have no regrets."
Williams won the hard-court tournament for the first time as a 17-year-old in 1999, but has not enjoyed much success since her third win in 2008.
She lost in an ill-tempered final last year and was also fined in 2009 after being involved in another incident during her semifinal defeat.
The former world No. 1 won the opening set in just 34 minutes as she threatened to steamroller Azarenka as she has all opponents since bouncing back from her first-round defeat at the French Open.
However, unlike in their Wimbledon semifinal clash in July, her 23-year-old opponent picked herself up and dominated the second set with some power play of her own.
Azarenka broke to lead 2-1 in the deciding set but was immediately pegged back by the fourth seed.
A break to love in the seventh game put her in the position of serving for the title at 5-4, but Williams rallied to win the next three games and leave Azarenka in tears after missing a golden chance to win her second grand slam title.
Williams took her record in grand slam finals to 15-4, becoming the first 30-something to win a major since Martina Navratilova at the 1987 U.S. Open as she claimed the $1.9 million first prize.
It was the first time since 2002 that a woman has won Wimbledon and the U.S. Open in the same year, when Williams also won the French Open.
She joined her older sister Venus and Steffi Graf as the only women to win Wimbledon, the Olympics and the U.S. Open in the same year.
It has capped a remarkable comeback for Williams, who spent almost a year out of the game following her 2010 Wimbledon triumph.
She needed surgery after cutting her foot in a freak accident at a restaurant, and then suffered life-threatening complications when blood clots formed on her lungs.