A lawyer for the home secretary has said people born in Northern Ireland remain British citizens according to the law, even if they identify as Irish.
NI woman Emma De Souza won a case against the Home Office after it deemed she was British when her US-born husband applied for a residence card.
The Home Office has appealed the decision.
The Good Friday Agreement allows people to be British, Irish or both.
On Tuesday, lawyers representing the Home Office and Ms De Souza in Belfast put forward opposing arguments by video link to two judges sitting in London.
Anyone born in Northern Ireland has the right to identify as Irish or British or both, thanks to the Good Friday Agreement, signed in April 1998 by the British and Irish governments and Northern Ireland's political parties.
Ms De Souza applied for a residence card for her US-born husband in December 2015, making the application under her Irish passport.
However, the Home Office rejected the application as it deemed Ms De Souza was British, even though she says that she never held a British passport.
They requested that Ms De Souza either reapply as a British citizen or renounce her British citizenship to apply as an Irish citizen.
But she challenged the decision, citing the Good Friday Agreement's terms that assert her ability to identify as Irish, British 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".
British Nationality Act
On Tuesday, a lawyer acting for the home secretary, told the court there was a "legal error" in the First Tier decision, arguing that the Good Friday Agreement (or Belfast Agreement) did not supersede the 1981 British Nationality Act.
He put to the court that the Good Friday Agreement is two documents - a multi-party agreement and an international treaty between the British and Irish governments.
He 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 (Ms De Souza) 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.
A lawyer acting for Ms De Souza, 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."
He said the UK does not have a written constitution and that commentators have reflected that its "beauty" is its "flexibility" and that "when we are looking at the UK constitution it draws upon not just one document".
"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," he added.
The judges have retired to consider the arguments, and a ruling will follow.