22 November 2011 Last updated at 07:53 GMT Nigerian man unlawfully detained for nine days
The Court of Appeal ruled that Emen Bassey was allowed to come into the UK because his daughter was born in Northern Ireland.
A Nigerian man was unlawfully detained by immigration officials when he tried to stay in Northern Ireland on a visitors' visa, the Court of Appeal has ruled.
Senior judges backed Emen Bassey's case that he was entitled to come into the United Kingdom because his youngest daughter was born in Belfast.
They quashed an Immigration Service decision to remove him.
Mr Bassey was held for nine days in 2007 before being granted bail.
He is now entitled to damages for wrongful detention.
Mr Bassey and his Nigerian wife had applied for visitors' visas, and he claimed the intention was to be in the UK for a week's vacation.
However, his luggage contained application forms for a school in Belfast, and when questioned he stated he wanted his three children to be educated there.
Immigration officers decided he was an illegal entrant who failed to disclose the real purpose for his visit.
Mr Bassey challenged their decision, relying on the Irish nationality of his daughter to show she was entitled to enter as a European Union citizen.
Ruling on his appeal against the outcome of judicial review proceedings, Lord Justice Girvan acknowledged that giving birth to the child in Belfast three years previously was probably deliberate because of the importance of nationality and citizenship benefits.
But he said the Immigration Service had failed to address the proportionality of detention in the circumstances of the case, taking into account the child's right to family life.
"The decisions failed to address the complexities of the situation," the judge said.
"Accordingly, we conclude that while the Immigration Service was justified in concluding that the appellant had initially entered the United Kingdom by deception on foot of the visitors visa, the decision to treat him as an illegal entrant and to remove him should be quashed.
"His detention was, accordingly, unlawful."
Lord Justice Girvan, sitting with Lord Justice Coghlin and Sir John Sheil, added: "Since the appellant's detention was unlawful he is entitled to damages for that wrongful detention."
He pointed out, however, that any assessment of damages should take into account the deception and that Mr Bassey's lack of disclosure of his true motivation for coming into the country was a significant factor in leading to his detention.