Brexit was among the issues that dominated the last of the European Election debates on RTÉ Television tonight.
The Prime Time Election Debate focused on the Midlands-North-West constituency.
The four-seat constituency includes Cavan, Donegal, Galway, Kildare, Leitrim, Longford, Louth, Mayo, Meath, Monaghan, Roscommon, Sligo and Westmeath.
The debate began with Independent Luke 'Ming' Flanagan saying he thought potentially there could have been good out of Brexit as it could have given a "jolt to this project of ever closer union".
However, he said it would be wrong to say Brexit would be good for Ireland and politicians need to admit when they are wrong.
Fianna Fáil candidate Brendan Smith said there needs to be reforms of the European Union.
He said the impact of Brexit must be minimised in the next European Parliament and that the achievements of the Good Friday Agreement must be protected.
Labour candidate Dominic Hannigan stressed the importance of Ireland forming alliances with other EU member states.
Green Party candidate Saoirse McHugh said she wanted more co-operation in areas such as climate action and a greater consolidated tax base, but could not see the situation arise where we will be forced into a greater union than we want or a greater military union within the EU.
Fine Gael's Mairead McGuinness said she favours a closer union of people as it is good that people work together.
She said the progress of the union since we joined has been "steady and agreed".
Sinn Féin's Matt Carthy said that it has taken the EU to ensure workers' rights. He said that a directive on non-performing loans, which would make it easier for banks to sell loans to vulture funds, is being opposed by Sinn Féin.
People Before Profit candidate Cyril Brennan said he favours civil disobedience, like the water charges protests and the Repeal the Eighth campaign, to oppose Brexit and remove border infrastructure.
Independent Peter Casey said Ireland has to do what is best for Ireland. He said he is pro-Europe and if Britain does leave we should have a discussion about what is in Ireland's best interests.
Mr Casey added that "if Britain is to leave there is an absolute crisis that is going happen our agri-business and what we should have is a common agricultural agreement so that the farmers will not be subject to the crisis that could happen with a hard Brexit".
Asked by presenter David McCullagh: "In April 2015, you suggested we should leave the EU if Britain left, then you suggested that we should stay and now you are saying we should think about it?"
Mr Casey said "we should get whatever deal Britain gets. That's the deal we need to get."
"If Britain leaves we need to make sure that we get whatever deal it gets."
Asked if he is talking about if we are to leave the EU, he replied "yes".
Fianna Fáil's Brendan Smith cited a tweet from Mr Casey the day after the 2016 Brexit referendum where he said "a great day for Britain, it will even be a better one for Ireland, next the Euro".
He said that every analysis shows clearly that the area most adversely affected by Brexit would be the border, Midlands and West area.
Labour's Dominic Hannigan said Mr Casey keeps calling for discussions but he never says what he means by that. He said "we are a nation built on diversity. We benefit from having so many people coming to live and work here."
Addressing Mr Casey's comments, Fine Gael's Mairead McGuinness said Mr Casey should realise the fishermen in Killybegs in Donegal are suffering because of Brexit and said "It is extremely reckless of anybody who wants to serve in public office".
The Green Party's Saoirse McHugh said we should take money from the Apple tax judgment. She said that there are company's hiding profits here that should be taxed elsewhere.
She said the difficulty that a lot of people have with the Apple tax judgment is that Fine Gael is using our money, tens of millions of euro, bringing a case in our name.
She said that by and large when the European Commission says something, by and large our Government agrees unless it affects our corporation tax.
She said we should not be doing backroom deals with corporations.
Cyril Brennan, People Before Profit, said the Apple tax judgment was a correct move by the European Union and he welcomed the move as it asks corporations to pay their taxes and this can be used to fund public services.
Luke 'Ming' Flanagan said that for €10 billion we could build 40,000 houses and we should never have taken the court case and kept the money.
Fianna Fáil's Brendan Smith said Ireland is not a tax haven. He said companies need tax certainty. He said Ireland operates within all international rules when it comes to tax.
Matt Carthy of Sinn Féin said "the difficulty when it comes to being a tax haven is it doesn't really matter what you think of yourself. It's like being an early riser or a good kisser; it's what other people think is important and lots of people think that we are a tax haven."
He said it could be damaging for future investment to pretend we are not a tax haven.
Mairead McGuinness acknowledged there is a global issue with big corporations that the EU cannot deal with on its own and the OECD is the platform to do it in.
Peter Casey said the Irish 12.5% corporation tax rate is no longer the panacea it once was.
Dominic Hannigan said we should welcome more migrants to Ireland, adding that, "I don't think it is fair to castigate people on the basis that they are immigrants that they are causing this [housing] problem."
He said it is wrong to be blaming sections of society for a problem caused by successive governments.
Ms McHugh said people in direct provision should have been allowed to work and we needed to treat them with dignity and respect.
Interrupted by Peter Casey, Ms McHugh said "millionaires scapegoating migrants is an old trope and it is boring."
Mr Casey said we have a skills shortage but we cannot bring in "welfare tourists" as we cannot afford them.
He said with direct provision, we should give people who are legally here a warm Irish welcome and if they are not legal they should not be allowed to stay.
He said that if they are genuine refugees coming from war-torn countries they should be welcomed.
Mairead McGuinness said there is a shortage of labour and Mr Casey was "out of touch".
Luke 'Ming' Flanagan said people who arrive here are not automatically entitled to Irish social welfare for the first three months.
He said we need to try and stop the arms industry making a fortune out of people's misery by selling arms to horrific regimes which in turn is forcing migration.
Matt Carthy said the direct provision system had created millionaires when it is meant to help the most vulnerable people in the world.
He said Peter Casey was exploiting very real concerns of rural communities who do not have services. He said their schools are under threat, their post offices are closing, their garda stations are closing, they do not have GP access and then all of a sudden they are told their local hotel is gong to be used for direct provision.
"So they are anxious, quite naturally and what Peter is trying to do is exploit that anger and turn that away from the millionaire vested interests, the Government parties who are overseeing this process and try to direct it at people who are finding themselves in a position they never wanted to be in."
Brendan Smith said the EU needed to address the root causes of migration.
He too was critical of Mr Casey's comments about "freeloaders".
Mr Casey said that 200,000 people move to the UK every year.
He rejected the charge that he is scare mongering and said the scariest thing happening is that Ireland has not had a proper discussion on migration.
Ms McGuinness said we have to help those who need help.
Saoirse McHugh said that she had a problem with platforming "incoherent fear mongering views". She said: "It looks like it's just for attention Peter. You haven't an idea what you are talking about. You are an economic migrant yourself."
She accused Mr Casey of inventing this issue. She warned that there are "real repercussions" to what he is saying and suggested: "Go on Dancing with the Stars if you want the attention".
Cyril Brennan said Ireland had benefited from becoming a multi-cultural society.
Matt Carthy defended running for Europe while also selected to contest the general election. He said that he does not know where he will be in five years. He said he is going before the electorate on Friday based on his reach record and the Sinn Féin policy platform.
Dominic Hannigan said Labour is Ireland's oldest party and rejected suggestions the party was facing the death knell.
Brendan Smith claimed RTÉ had juxtaposed two statements together when he was on radio during the financial crisis as agriculture minister offering people free cheese.
Cyril Brennan rejected suggestions that there is an argument for some form of co-operation on military spending.
There are a total of 17 candidates contesting the Midlands-North-West.
The other candidates are: Patrick Greene (Direct Democracy Ireland); Fidelma Healy Eames (Independent); Dilip Mahapatra (Independent); James Miller (Independent); Diarmaid Mulcahy (Independent); Olive O'Connor (Independent); Michael O'Dowd (Renua Ireland); Anne Rabbitte (Fianna Fáil); Maria Walsh (Fine Gael).
Voters head to the polls this Friday for the European Elections, Local Elections and a Divorce Referendum, while people in Cork City, Limerick and Waterford will also be asked their views on directly elected mayors.
Thirteen MEPs will be elected in the three Ireland European constituencies.
Ireland South is a five-seat constituency taking in Carlow, Clare, Cork, Kerry, Kilkenny, Laois, Limerick, Offaly, Tipperary, Waterford, Wexford and Wicklow.