The art-world satire The Square has won the Palme d’Or at the 2017 Cannes film festival. Directed by Ruben Östlund, The Square is about a museum director (played by Claes Bang) who is desperate to make a success of his gallery, and stages a new installation called “The Square” to promote it.

The Square was well received after its debut on 19 May, earning a string of glowing reviews. The Guardian’s Peter Bradshaw gave it four stars, saying it created “some gobsmackingly weird and outrageous spectacle, with moments of pure showstopping freakiness”.

Swedish director Östlund is best known for his previous film, Force Majeure, which also addressed the toxic nature of middle-class guilt. The film also starred Mad Men’s Elisabeth Moss and The Wire’s Dominic West, as well as an already-celebrated appearance from animal-movement expert Terry Notary, as a performance artist who impersonates an ape.

The Square’s victory somewhat upset the formbook, as much attention appeared to be focussing on Andrei Zvyagintsev’s eerie fable Loveless, an apocalyptic study of a failed marriage and the subsequent disappearance of a child, and Robin Campillo’s 120 Beats per Minute, about the French arm of the Aids-activist Act-Up movement. In the end they were awarded the jury prize and grand prix, respectively, the festival’s notional third and second prizes.

Joaquin Phoenix with his best actor award for You Were Never Really Here. Photograph: Jean-Paul Pelissier/Reuters

The jury, presided over by Spanish film-maker Pedro Almodovar, gave two awards to Lynne Ramsay’s sex-traffic thriller You Were Never Really Here: a joint best screenplay award and best actor to Joaquin Phoenix; the latter appeared shellshocked to win, and took to the stage wearing Converse sneakers.

The best actress award went to Diane Kruger, who played a woman seeking revenge for her husband’s death in a terrorist bombing in In the Fade, directed by Fatih Akin; although the film itself received largely negative reaction – including a two-star review from the Guardian’s Peter Bradshaw – Kruger’s first performance in her native German was well-liked. Kruger dedicated her win to everyone who “has survived an act of terrorism and who is trying to pick up the pieces and go on living after having lost everything”.

Sofia Coppola became only the second woman to win Cannes’ best director award (the first being Yuliya Solntseva in 1961 for the Russian film The Story of the Flaming Years). Coppola’s adaptation of Thomas Cullinan’s The Beguiled won many plaudits, and in a statement read out by jury member Maren Ade Coppola thanked Jane Campion, the only female Palme d’Or winner to date, for being a “role model”.

The Camera d’Or for best first film went to Jeune Femme, from French director Léonor Serraille, while the maker of the best short film, Qiu Yang, declared the award “fucking amazing”.

As suggested earlier in the festival by Almodovar, neither of the Netflix-backed selections in the competition – the ensemble comedy The Meyerowitz Stories and giant-pig eco-fable Okja – received any award recognition.

• This article was corrected on 29 May 2017. We had confused the plot of Loveless with that of A Gentle Creature, a film set in Russia that was also in the competition.