Image copyright Getty Images Image caption Damn won six MTV Awards in August and is up for seven Grammys in 2018

Kendrick Lamar's sparse and hard-hitting rap treatise, Damn, is music critics' favourite record of 2017.

The album, which explores the conflicts in Lamar's personal life, his faith and American society, has topped a "poll of polls" compiled by BBC News.

Second place went to SZA's sensual, intimate and partially-improvised R&B album, CTRL.

Pop star Lorde came third with Melodrama, an exhilarating song cycle about the angst and ecstasy of youth.

Melodrama was co-written and produced by Jack Antonoff, who worked on two other albums in the critics' top 20 - St Vincent's Masseduction and Taylor Swift's multi-million-selling Reputation.

The full top 20 looked like this:

Best albums of 2017 - poll of polls Artist Album Points (max: 600) 1) Kendrick Lamar Damn 506 2) SZA CTRL 394 3) Lorde Melodrama 384 4) St Vincent Masseduction 277 5) LCD Soundsystem American Dream 186 6) The War On Drugs A Deeper Understanding 149 7) Jay-Z 4:44 134 8) Perfume Genius No Shape 119 9) Sampha Process 116 10) Kelela Take Me Apart 115 11) Kesha Rainbow 111 12) Vince Staples Big Fish Theory 108 13) Father John Misty Pure Comedy 102 14) Tyler, The Creator Flower Boy 98 15) The National Sleep Well Beast 86 16) Taylor Swift Reputation 83 =17) Khalid American Teen 82 =17) King Krule The Ooz 82 19) J Hus Common Sense 69 20) Wolf Alice Visions of a Life 66

Read more about the Top 10 albums.

The results were compiled from 30 "album of the year" polls, published by the most influential magazines, newspapers and blogs in music - from specialist magazines like Billboard and the NME to more mainstream outlets, such as Cosmopolitan and PopSugar.

Records were assigned points based on their position in each list - with the number one album getting 20 points, the number two album receiving 19 points, and so on.

There was a huge diversity amongst the critics' picks, with 181 albums cited across the 30 polls surveyed by the BBC.

Ed Sheeran's ÷, which is the biggest-selling album of 2017, was only cited once - by People magazine, who put it in seventh place in their year-end list.

Media playback is unsupported on your device Media caption Highlights of Lorde's set at Glastonbury 2017

Critics also selected Charli XCX's mixtape Number 1 Angel and Drake's More Life project - which was marketed as a playlist - amongst their choices, illustrating how albums are evolving in the streaming era.

But Lamar was the runaway winner. Damn featured on all but two of the polls surveyed by the BBC, and took first place on 10 of them.

Q magazine called it "a flawless hip-hop masterclass", praising the Compton-born rapper's "pyrotechnical brilliance on the mic".

The star's gift is that he can "paint pride and agony with the same brush", agreed Rolling Stone, singling out the seven-minute album track Fear as a highlight.

"Like Sigmund Freud meets Scarface, Lamar connects the dots from the seven-year-old terrified of catching a beating from his mother to the 17-year-old terrified of being murdered by police to the 27-year-old terrified of fame."

"It is the unimpeachable truth that Kendrick Lamar recorded the greatest album of 2017," said Billboard.

Removing non-UK publications from the BBC's "poll of polls" kept Lamar at number one, but propelled UK rappers J Hus, Stormzy and Loyle Carner higher up the rankings.

The 30 "best of" lists appeared in: Associated Press, The Atlantic, The AV Club, Billboard magazine, Consequence of Sound, Cosmopolitan, Dazed & Confused, Drowned In Sound, Entertainment Weekly, Fuse, The Guardian, The Independent, Line of Best Fit, Mojo, NME, NPR, Paste, People magazine, Pitchfork, Popsugar, Q Magazine, Rolling Stone, Spin, Stereogum, The Times, Time Magazine, Time Out New York, Uncut, Uproxx and Vice.

Follow us on Facebook, on Twitter @BBCNewsEnts, or on Instagram at bbcnewsents. If you have a story suggestion email entertainment.news@bbc.co.uk.