Author Mem Fox has made many trips to the US but doubts she will ever go there again.

Australian author Mem Fox has received a written apology from the United States after what she said was a traumatic detention by immigration officials at Los Angeles Airport.

Key points: Author says she collapsed and sobbed after her immigration ordeal

Her complaint to US embassy officials brought a swift written apology

She expressed fears Australia might also become less welcoming

Fox, who was questioned by Customs and Border Protection officers for two hours earlier this month as she was on her way to Milwaukee to address a conference, said she collapsed and sobbed at her hotel after she was released.

She said the border agents appeared to have been given "turbocharged power" by an executive order signed by President Donald Trump to "humiliate and insult" a room full of people they detained to check visas.

That executive order was eventually halted by Federal Courts and it was expected a new order would be signed this week, designed to avoid the confusion caused by the original.

"I have never in my life been spoken to with such insolence, treated with such disdain, with so many insults and with so much gratuitous impoliteness," Fox said.

"The entire interview took place with me standing, with my back to a room full of people in total public hearing and view — it was disgraceful.

"I felt like I had been physically assaulted which is why, when I got to my hotel room, I completely collapsed and sobbed like a baby, and I'm 70 years old."

Fox, whose books include classics such as Possum Magic and Ten Little Fingers and Ten Little Toes, said she was questioned about her visa status, even though she had travelled to the United States 116 times previously without incident.

"My heart was pounding so hard as I was waiting to be interviewed, because I was observing what was happening to everybody else in the room," she said.

"They accused me of coming in on the wrong visa and they were totally wrong about that.

"The person who interviewed me was heavy with weaponry, was totally dressed in black with the word 'police' in hand-sized letters across his chest."

Author complained and got 'charming' response

The author lodged a complaint with the Australian embassy in Washington, and later one with the United States embassy in Canberra to which she received an emailed letter of apology.

"I said any decent American would have been shocked to the core by what had happened, it was so dreadful," Fox said.

Popular books by Mem Fox: Possum Magic (1983)

Koala Lou (1988)

Time for Bed (1993)

Tough Boris (1994)

Sleepy Bears (1999)

Where is the Green Sheep? (2004)

Ten Little Fingers and Ten Little Toes (2008)

I'm Australian Too (2017)

"And I had an absolutely charming letter from them within hours of my email hitting their desk."

The author said she was unlikely to visit the United States again despite the friendliness of ordinary Americans.

"At the moment I'm in so much shock about it, I can't imagine going back to the states," she said.

"I'd hate not to go back to the states because it's been so good to me and Americans in general are not [like] the border police at LA airport."

She said the treatment of others in the airport holding room, including Iranians, Taiwanese and a Scandinavian parent with a small child, was just as poor, and all appeared to eventually have been released.

"I thought: 'How can human beings treat other vulnerable human beings in this fashion, in public, in full view of everybody?'

Embassy officials have a policy of not discussing individual cases due to privacy requirements.

The author's treatment by US border officials was condemned by many Australians on social media and her name was trending on Twitter.

Fox worried about Australian attitudes

Fox also said she feared Australia was heading down the same unwelcoming pathway as the US appeared to be.

"I'm very frightened that Australia will go the same way as America, with extremists in power, racist hatred, ghastly speech against decent people," she said.

"I have written a new book which is about, ironically, welcoming strangers to a strange land — Australia — and I wrote it because I perceived that Australia was losing its gorgeous warmth of character in our attitude to newcomers.

"The irony is that this happened to me at about the same time as I was about to publish this 'welcome to Australia' book."