A baby born in the UK to two parents who have indefinite leave to remain in Britain has been denied the right to live in the country in what a human rights lawyer has described as a potentially unlawful move.

Dr Charles Kriel, a US national and special adviser to a parliamentary select committee, said he was returning to the UK from a holiday in Florida with his fiancee, Katharina Viken, and their baby daughter was denied entry. The child was eventually given a six-month tourist stamp to enter the country.

“We were devastated when we were going through it. Immigration officials said there were problems but would not say what they were. This guy said: ‘Just because she is born here doesn’t mean she has a right to be here. You need to sort it out,” Kriel told the Guardian.

“A stamp was put in the passport, saying she [the baby] has six months to be here as long as she does not engage in work. I don’t think she will applying for a job any time soon … So I have indefinite leave to remain and have had that since the late 1990s – I’ve lived in London since then. My fiancee has lived in London for more than 10 years and has an EEA [European Economic Area] passport. We were very clear about all these things with the immigration officials. So now she has the stamp and we are hopeful we can sort it out.”

The human rights lawyer Shoaib Khan said the family had been treated appallingly. He also questioned the legality of the decision.

“Born to a parent with indefinite leave to remain in the UK, this baby was British by birth. The Home Office has essentially granted a three-month-old British baby a ‘tourist’ visa as a condition of entry to the UK. The mother has also been in the UK for a decade as an EEA national and so will most likely have the right to reside here permanently. The baby should be British for that reason too. It is therefore hard to see any legal justification for this decision.”

Khan said it appeared to be a matter of immigration officers not knowing the law and just “following orders to make lives as difficult as possible for anyone who does not have a British passport”.

He added: “The Home Office continues to treat extremely vulnerable people in a completely unacceptable way. Clearly Windrush and other scandals have taught the Home Office nothing.”

Jacqueline McKenzie, an immigration lawyer, said: “We don’t know what evidence the family presented at the port of their own status but the law is clear that a child born in the UK to a person with indefinite leave to remain is British and therefore entitled to evidence of this through registration. Similarly, a child born to an EEA national with permanent residence in the UK is also entitled to be registered British. There’s a presumption in favour of the baby’s right to live in the UK therefore, and that would also have been the case if the mother wasn’t settled but exercising her free movement rights.”

McKenzie said what struck her about the story was that the border immigration official was “aggressive and unprepared to reason”.

“It’s this inability to show compassion and common sense in Home Office decision-making that led to the Windrush scandal,” she said.

UK citizens are required to have indefinite leave to remain, unless their parentage automatically grants them such. All EEA citizens resident in the UK and their family members can apply to the EU settlement scheme to obtain the UK immigration status they will require in order to live and work in the UK after 30 June 2021.

A Home Office spokesperson said: “We do not routinely comment on individual cases.”