Sir Ben Ainslie’s Oracle Team USA sealed one of sport’s greatest comebacks when they overhauled an 8-1 deficit to beat Team New Zealand in the America’s Cup decider in San Francisco.

The holders won eight straight races to triumph 9-8 after being docked two points for cheating in the build-up.

Oracle surged to victory by 44 seconds to retain the Cup they won in 2010.

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.

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.

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.