People born in Northern Ireland remain British citizens according to the law even if they identify as Irish, a court has heard.
The argument was made by a lawyer acting for the Home Secretary during an Upper Tier appeal after Northern Ireland woman Emma DeSouza won her case that she is an Irish citizen.
It followed legal action by Ms DeSouza, from Magherafelt, whose application to have her US-born husband granted UK residence as the spouse of an EU national was turned down by the Home Office.
Government officials said Ms DeSouza is automatically British, having been born in Northern Ireland.
Ms DeSouza challenged the decision, arguing that the 1998 Belfast Agreement allows for the people of Northern Ireland to identify as British, Irish or both.
In 2017 a judge at a First Tier Immigration Tribunal ruled that Ms DeSouza was an "Irish national only who has only ever been such".
The Home Office appealed against the decision.
On Tuesday, lawyers representing the Home Office and Ms DeSouza in Belfast put forward opposing arguments by video link to two judges sitting in London.
Tony McGlennan QC, acting for the Home Secretary, told the court there was a "legal error" in the First Tier decision, arguing that the Belfast Agreement did not supersede the 1981 British Nationality Act.
He put to the court that the Belfast Agreement is two documents - a multi-party agreement and an international treaty between the British and Irish governments.
Mr McGlennan said the 1998 Northern Ireland Act includes sections from both documents, but does not include the provisions around identifying as British, Irish or both, and therefore the 1981 Act stood.
"She identifies herself as Irish. The operation of the British Nationality Act 1981 means that she has held British citizenship since her birth," he said, adding that her British citizenship was never renounced.
Ronan Lavery QC, acting for Ms DeSouza, said it is up to the courts to interpret documents such as the 1998 Northern Ireland Act along with the Belfast Agreement.
"Lord Bingham said (in a speech) the 1998 Act was passed to enact the Belfast Agreement which was itself reached after much travail in an attempt to end decades of bloodshed and centuries of antagonism," he said.
"And that is what we are dealing with here. The UK doesn't have a written constitution... and commentators have reflected over this in the last weeks as the Brexit crisis has loomed, in fact that's the beauty of the UK constitution - it's flexibility - that when we are looking at the UK constitution it draws upon not just one document... we are entitled to look at historical events, how we reached a certain point and what the interests of public policy are in a flexible and fluid environment.
"And in the context of Northern Ireland, when one is interpreting any piece of legislation one must look at the Belfast Agreement and the provisions of it, and interpret the legislation in a way which is consistent with it.
"What is it about UK policy that would require a government to foist citizenship upon people who do not want it... who find it offensive to have that citizenship foisted upon them? What part of government policy is that? It's not part of any government policy."
The judges retired to consider the arguments, and a ruling will follow.
Sinn Fein MEP Martina Anderson, Sinn Fein MP for Fermanagh Michelle Gildernew and SDLP MLA Dolores Kelly were among Ms DeSouza's supporters at the Royal Courts of Justice in Belfast on Tuesday.