First Minister Alex Salmond, leader of the pro-independence Scottish National Party (SNP), had been expected to dominate the debate with Alistair Darling, a fellow Scot and leader of the "Better Together" campaign.
But Darling, who was Britain's finance minister during the 2008 economic crisis, held his own as he pressed the SNP leader early on his crucial claim that an independent Scotland would continue to use the pound sterling -- something London says will not be possible.
Salmond insisted this would not be a problem, and hit back by asking Darling repeatedly whether he believed Scotland could successfully be an independent country, a question his opponent dodged.
Both campaigns had said the debate could be a turning point in the campaign for the September 18 referendum, when four million Scots will vote on their future.
In the end, neither side delivered a knock-out blow, but a snap poll showed Darling an unexpected winner as 56 percent of respondents said he won, versus 44 percent for Salmond. Both the 'Yes' and 'No' campaigns claimed victory.
A definitive win was needed more by the 'Yes' campaign, which had pinned its hopes on Salmond's talent for debate to overcome a stubborn gap in the polls.
A poll tracker by the Financial Times newspaper currently puts the "Yes" vote at 36 percent, 10 points behind those who would vote "No" to independence. Some 16 percent remain undecided.
Exchanges between the two debaters became increasingly heated, and at one point Salmond was accused by an audience member of being "snide" and giving a worrying impression of what an independent Scotland would be like.
Members of the public audience heckled, booed and cheered the two men throughout, prompting the moderator to ask them to show respect and allow the politicians to be heard.
There were a few moments of levity, sparked by Salmond's complaint that for much of his life, Scotland had voted for left-of-centre parties but received a Conservative government.
The SNP leader quipped that there were more pandas in Edinburgh Zoo (two) than Scottish Tories in the House of Commons in London (one).
Darling responded by noting that he was Scottish but did not vote for the SNP. "I didn't vote for him but I'm stuck with him," he quipped.
'Opportunity of a lifetime'
In his opening speech, Salmond argued that Scottish people should be able to decide their own future, a dream that could not be achieved under the current system of devolution.
"My case this evening is this: no one, no one will do a better job of running Scotland than the people who live and work in this country," he said.
"On September 18 we have the opportunity of a lifetime. We should seize that opportunity with both hands."
But Darling warned of the risks of going it alone and argued that Scotland would pay too high a price to leave the union, saying: "Remember this -- if we decide to leave there is no going back, there is no second chance."
The second half of the debate was dominated by discussion of policy and the practicalities of a split - such as how pensions might be divided, and how independence might affect Scotland's universities.
The leaders of Britain's three main parties have vowed to hand over more powers to Scotland's devolved government if voters decide to stay in the 307-year-long union with England.
Currently, Scotland looks after its own education, health, environment and justice, but the UK parliament in London still decides defence and foreign policy.
Conservative Prime Minister David Cameron, opposition Labour leader Ed Miliband and Liberal Democrat chief Nick Clegg, the deputy prime minister, signed a joint declaration that would give Edinburgh more tax-raising control.
Darling said that with these new powers Scotland could have the "best of both worlds" -- more control and the support of a strong United Kingdom.
However, one of the key players in the campaign for Scottish devolution in the late 1990s, retired clergyman Kenyon Wright, branded the promise of new powers a "desperate bribe".
The debate was not shown on television in England, but Scottish broadcaster STV made it available worldwide online. However, many viewers complained that the website crashed continually.
Those who did view the event were left with memorable closing lines from Salmond.
"Voting Yes is a vote for ambition over fear," the SNP leader said.
"It tells the world that Scotland is an equal nation that carries itself with confidence and belief. This is our moment. Let's take it."