Oracle surged to victory by 44 seconds to retain the Cup they won in 2010.
Recent America's Cup winners
Oracle (US) bt Team NZ 9-8
Oracle (US) bt Alinghi (Swi) 2-0
Alinghi (Swi) bt Team NZ 5-2
Alinghi (Swi) bt Team NZ 5-0
Team NZ bt Luna Rossa (Ita) 5-0
Team NZ bt Young America (US) 5-0
The Kiwis won four of the first five races, making Oracle modify their boat and call Ainslie from the warm-up crew.
The British sailing legend, 36, a
four-time Olympic champion,
was drafted in as tactician in place of American veteran John Kostecki and was instrumental in the US outfit's resurgence.
"It's been one of the most amazing comebacks ever, I think, almost in any sport but certainly in sailing and to be a part of that is a huge privilege," said Ainslie.
Ainslie combined superbly with Oracle's Australian skipper James Spithill and strategist Tom Slingsby, another Australian who won Laser gold at London 2012, to drag the syndicate back from the brink in the most remarkable turnaround in the event's 162-year history.
"To be perfectly honest, we had a mountain to climb," Ainslie added. "We knew we had to sort ourselves out. We had to get the boat going faster. We did that.
"The designers did a great job and we had to start sailing better. We got the momentum going and we started believing in ourselves. When you do that, you can become quite strong. "
The New Zealanders, with impressive early pace upwind and slicker boat handling, opened up a seven-point lead (six to minus one) as Oracle's crew and equipment changes took effect.
Sir Ben Ainslie on America's Cup win
But the US outfit, bankrolled by software billionaire Larry Ellison, were soon up to speed and won 10 of the next 12 races to lift the oldest trophy in international sport, known affectionately as the "Auld Mug".
The Kiwis, led by skipper Dean Barker, came within two minutes of glory in race 13 in uncharacteristic light winds before organisers abandoned the race because the 40-minute time limit had elapsed.
In the decider in fresh breeze and sunshine on San Francisco Bay, Team New Zealand edged a tight start and beat Oracle to the first mark. The Kiwis stayed clear around the second mark but lost the lead to the Americans early on the upwind leg.
After briefly retaking the advantage, the Kiwis then watched as Oracle stormed ahead with remarkable upwind pace and remained clear for a comfortable win.
“I'm incredibly proud of our team and what they've achieved but I'm gutted we didn't get the last win we needed”
Team New Zealand skipper Dean Barker
"What a race," said Spithill, 34, after only the third winner-takes-all final in the event's history. "It had everything. Man, these guys just showed so much heart.
"On your own, you're nothing, but a team like this can make you look great. We were facing the barrel of a gun at 8-1 and the guys didn't even flinch. Thanks to San Francisco, this is one hell of a day."
Barker, 41, said: "It's obviously very hard to fathom. We went out there to give it our absolute best shot. We felt we didn't leave anything on the table. It's very hard to swallow. The gains they've made are phenomenal.
"I'm incredibly proud of our team and what they've achieved, but I'm gutted we didn't get the last win we needed to take the Cup back to New Zealand."
As winners, Oracle will decide on the format, venue and timing of the 35th America's Cup.
The US syndicate
first won the Cup in 2010,
when they beat holders Alinghi of Switzerland in a one-off match in huge multihulls following protracted legal wrangling.
Ellison and Oracle Team USA boss Russell Coutts, who won the Cup for New Zealand in 1995 and 2000 before defecting to Alinghi for 2003, devised a new concept for the 2013 competition.
America's Cup explained
First staged in 1851 off the Isle of Wight in England. Won by US yacht America.
Racing is boat-on-boat, called match-racing.
The event begins with a challenger series - the Louis Vuitton Cup - to decide who gets to take on the defender in the America's Cup.
The winner decides the format and venue of the next event. It takes place roughly every 3-5 years but one-off challenges - to do with complicated court proceedings - also occur.
As holders Oracle chose 72ft catamarans with rigid wing sails. Foils were pioneered by New Zealand. The high-speed boats were initially criticised over safety, particularly after Andrew Simpson's death in May, but thrilling racing suggests multihulls could remain for the next event, though possibly smaller.
Oracle also brought racing close to the shore and ushered in a new era of TV production with on-screen graphics to help simplify the sport, a development likely to remain.
No British team have won it, but Sir Ben Ainslie has already launched Ben Ainslie Racing with a view to changing that.
They opted for revolutionary 72ft catamarans with rigid wing sails - and foiling daggerboards later pioneered by the Kiwis - which allowed the boats to reach startling speeds of more than 50mph.
Races were brought inshore to make it more accessible for fans, while cutting-edge TV production with on-screen graphics were introduced to make it more appealing for a new audience of TV viewers.
But the format was controversial and designs untested, with critics fearing for the safety of sailors.
Oracle capsized last year, but it was
the death of British Olympian Andrew Simpson
in a training accident in May that prompted wide-ranging safety measures, including upper wind-speed limits and personal breathing apparatus.
Critics also pointed to spiralling costs, with only three teams - Artemis Racing of Sweden, Emirates Team New Zealand and Luna Rossa Challenge of Italy - emerging to compete in the Louis Vuitton Cup challenger series for the right to take on Oracle.
But despite Team New Zealand's early stranglehold and a number of races postponed because of unfavourable winds, the America's Cup showed that match-racing in giant catamarans can be hugely exciting and is likely to be the future of the event.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.