The former prime minister of Norway, Kjell Magne Bondevik, said he was detained at a US airport earlier this week because he had visited Iran in 2014.
Mr Bondevik, who said he was travelling on his diplomatic passport, was held for about an hour.
He said his passport also indicates he is a former prime minister.
Immigration officials told him it was unrelated to President Trump’s temporary ban on Iranian nationals.
Instead, he was told it related to a 2015 law which places extra restrictions on countries that are part of the US visa waiver programme, according to an interview with ABC7 news.
But Mr Bondevik said he has never had an issue travelling to the US with the same document before Mr Trump’s order.
During his 2014 Iran trip, he spoke against extremism at an international conference on behalf of human rights organisation The Oslo Centre, of which he is president.
- Trump border policy: Who’s affected?
- US residents in legal limbo at airport
Iran is one of the seven countries affected by the controversial executive order from the new president.
“I was surprised, and I was provoked,” he said, suggesting that the mention of Iran had made him “stick out”.
“There is no reason to be afraid of a former head of government who has been on official visits several times to this country, including in the White House,” he told Norwegian broadcaster TV2.
The former prime minister was flying to the US to attend the national prayer breakfast event in Washington – which President Donald Trump also attended.