The most political moment of the Oscars came from a winner not in the room.

Iranian director Asghar Farhadi picked up the Academy Award for best foreign language film for The Salesman, a drama about a couple whose relationship begins to turn sour during their performance of Arthur Miller's classic play.

Farhadi boycotted the ceremony in protest at President Donald Trump's controversial US travel ban — a measure he condemned in a powerful statement read to Hollywood's finest by Anousheh Ansari, an Iranian astronaut.

"I am sorry that I am not here tonight. My absence is out of respect for the people of my country and the other six nations whom have been disrespected by the inhumane law that bans entry of immigrants to the US," it said.

"Dividing the world into the 'us' and 'enemy' categories creates fear.

"A deceitful justification for aggression and war. These wars prevent democracy and human rights in countries which have themselves been victims of aggression."

He concluded with a passionate defence of the power of film to break stereotypes, and create "an empathy we need today more than ever".

Firouz Naderi, a former NASA director, and an Iranian, stood beside Ms Ansari as she read Farhadi's words.

Backstage, Ms Naderi said Farhadi chose two scientists who focus on space because, "if you go away from the Earth and look back at the Earth you don't see the borders and the lines".

Protests swirled in the run-up to the Oscars, and host Jimmy Kimmel landed a few direct hits on Mr Trump in his opening address, saying the President's policies had made the Oscars seem less racist.

Mr Trump was also the focus of a low-key red carpet protest, with stars sporting blue ribbons in a show of support for the American Civil Liberties Union, which fought to overturn his travel ban.

The measure, which targeted predominantly Muslim countries, including Iran, also led to an unprecedented show of solidary between the six nominated directors in the foreign language category.

Two days before the Oscars, the six directors issued a joint statement decrying the climate of "fanaticism and nationalism" in the US "and in so many other countries, in parts of the population and, most unfortunately of all, among leading politicians".

They said that no matter who won, the award would be dedicated to people working to foster "unity and understanding".