ITV debate: Farage and Cameron face EU questions
Nigel Farage has said he has been "demonised" for his views on immigration as he and David Cameron faced questions in a live EU TV debate.
The UKIP leader faced accusations of "inflammatory" scaremongering during exchanges with members of the public.
But he insisted there was wide support for "getting a grip" on migration, including from ethnic minority groups.
The PM said there were "good and bad ways" to control immigration but warned against a "Little England" stance.
Mr Farage and Mr Cameron did not debate head-to-head but appeared in turn on the ITV referendum special - hosted by Julie Etchingham - each facing half-an-hour of questions on the economy, immigration, security and sovereignty from the 200-strong audience.
- Follow the latest updates with BBC Referendum Live
- Farage and Welby in 'racism row'
- 'Last chance' to register for EU vote
Making the case for the UK to leave the EU, the UKIP leader argued the 28-member union was "done for" economically and that even if UK firms had tariffs imposed on them after leaving, this would cost less than the amount the UK was currently giving to Brussels.
"No deal is better than the rotten deal that we have at the moment," he said.
Pressed on the Leave campaign's plans to stop EU migrants having the automatic right to live and work in the UK, Mr Farage said he accepted that migrants did make a contribution to the UK economy but "the real truth is that there is more to life than GDP" and the reality was that "ordinary decent Britons" had had "a rotten time" in recent years.
Mr Farage was forced onto the defensive over comments he made about the risk of Cologne-style sex attacks by migrants in the UK, which have been criticised by the Archbishop of Canterbury, telling one women who raised the question to "just calm down there".
While the UKIP leader said he was not going to attack Justin Welby, he urged him to read what he actually said in a recent interview with the Daily Telegraph and not the newspaper headlines which followed it.
By Chris Mason, BBC political correspondent
Welcome to what Westminster excitedly calls "the spin room".
Think of it like this - a bunch of politically obsessed reporters all going to the cinema together to watch a political TV show.
We gathered at the Methodist Central Hall in Westminster. Messrs Cameron and Farage were seven miles to the north east at the Olympic Park.
Government ministers, MEPs, press advisers and spin doctors circle, keen to drop a word in the ears of us reporters.
So, what do they tell us? It's a variation on the following sentence: "Our man won."
But many in the room appeared to conclude that whilst the ITV programme amounted to an hour of passion, anger and irritation from those putting the questions, neither man offering answers delivered a knock-out blow.
Brandishing a passport and calling for the UK to regain control of who came into the country, he said there was a "real problem" that the EU's policy of open borders made the UK more vulnerable to the risk of terrorism.
"I am used to being demonised because I have taken on the establishment," he said. "In no other system in the world do we have free movement of people along with free movement of goods.
"If you had an Australian points system rather than an open door to 500 million people, it would be better. There is big support for this amongst ethnic minorities who know this is our only chance to get a grip on this issue."
'Fight don't quit'
Addressing the same audience, Mr Cameron said he was frustrated by the EU but this was not a justification for walking away, saying he wanted to lead a country that was a "fighter not a quitter".
"The right thing to do is to fight for a great Britain in the EU and not take the Little England option of Nigel Farage," he said.
He argued there was a growing consensus that a vote to leave the UK would "put jobs at risk and shrink the economy", criticising Mr Farage for downplaying the economic arguments.
"GDP is the size of our economy. It is the combination of all the wealth our country creates. He (Farage) is basically saying it doesn't really matter. He is so keen to get us out of Europe that he is prepared to sacrifice jobs and growth along the way."
The prime minister was repeatedly criticised by members of audience for failing to control migration - one questioner saying he had three children living in one room, could not get a doctor's appointment and that parts of the UK had been turned into no-go areas.
While he accepted immigration was a challenge, Mr Cameron said there were different ways of responding: "A good way is saying people can come here... but they have to pay in before they can get out."
Claiming the vote was not about his future, he said he would accept the people's instructions whatever the outcome.
The event, staged in the Olympic Park in east London, took place just before the midnight deadline for people to register to vote in the 23 June referendum.
At a press conference earlier on Tuesday, Mr Cameron appealed to people to sign up to vote and not to "sit on the sidelines", saying it was a decision that would shape the UK's destiny for years to come.
However, the voter registration website began to suffer some technical problems late on Tuesday evening as the deadline approached, going down at one point.