Border agents detained and questioned the son of the boxing legend Muhammad Ali about his religion when he flew back to the US this month, a family lawyer said.

“Where did you get your name from? Are you a Muslim?” they asked the 44-year-old Muhammad Ali Jr, who was born in Philadelphia and is a US citizen.

When Ali confirmed to immigration officials at Fort Lauderdale-Hollywood international airport in Florida that he was a Muslim, they began questioning him about where he was born, family friend and lawyer Chris Mancini told the Courier-Journal newspaper. The questioning lasted for about two hours.

Ali had been at a black history month event in Jamaica with his mother, Khalilah Camacho-Ali. She was allowed to enter the country after producing a photo of herself with her famous ex-husband, who died last year, but her son had nothing to prove his link to the boxer.

The 7 February incident was the first time the family had been detained or questioned in this way, despite regular international travel, Mancini said.

They consider it religious profiling linked to President Donald Trump’s campaign promise to bring in a “Muslim ban” and his now-suspended executive order banning citizens from seven Muslim-majority countries from entering the US.

“To the Ali family, it’s crystal clear that this is directly linked to Mr Trump’s efforts to ban Muslims from the United States,” Mancini said, adding that they were trying to find out how many others faced similar questioning, and were contemplating filing a federal lawsuit.

“Imagine walking into an airport and being asked about your religion,” Mancini told the paper. “This is classic customs profiling.”

Ali’s is the latest in a string of complaints about US immigration controls after the inauguration of Trump.

The former prime minister of Norway was held for nearly an hour at Washington Dulles airport earlier this month and questioned over a visit to Iran three years ago, which he had made to speak at a human rights conference.

Meanwhile, the best-selling Australian children’s book author Mem Fox has suggested she might never return to the US after she was detained and insulted by border control agents at Los Angeles international airport. The 70-year-old said she was left “sobbing like a baby” after two hours of questioning while on her way to a conference.

A British Muslim schoolteacher travelling to New York last week as a member of a school party from south Wales was denied entry to the US. The foreign secretary, Boris Johnson, had previously claimed the US government had committed to allowing all UK passport holders to enter the country.