Amazon has released its annual list marking its best-selling books of 2016, best-selling kids and teens books of 2016, as well as the "most gifted" and "most wished for" books of the year.

J.K. Rowling, Jack Thorne, and John Tiffany's Harry Potter and the Cursed Child: Parts 1 and 2 swept the competition, and was the top-selling book in all four categories. It is the first time a play has made the top 20 bestsellers list.

In the main category, Paul Kalanithi's When Breath Becomes Air was #2, and in kids and teens, Jeff Kinney's Double Down, the 11th installment in his Diary of a Wimpy Kid series, was #2. Kinney has now made the kids and teens list four years in a row.

“This year’s bestselling list showcases the variety of Amazon readers’ tastes, from literary fiction to thrillers to memoirs,” Amazon senior book editor Chris Schluep said in a statement. He added: “The power of Potter is still strong, and readers of all ages can’t get enough of Hogwarts. Harry Potter and the Cursed Child was the most anticipated book of the year, breaking pre-order records months before its release.”

In order to be eligible for the list, books must have published in first edition in 2016. The list reflects both print and Kindle purchases.

The top 20 best-selling books of 2016 overall are:

1. Harry Potter and the Cursed Child, Parts 1 & 2, Special Rehearsal Edition Script by J.K. Rowling, Jack Thorne and John Tiffany
2. When Breath Becomes Air by Paul Kalanithi
3. The Whistler by John Grisham
4. The Last Mile (Amos Decker series) by David Baldacci
5. Killing the Rising Sun: How America Vanquished World War II Japan by Bill O'Reilly and Martin Dugard
6. Hillbilly Elegy: A Memoir of a Family and Culture in Crisis by J.D. Vance
7. Truly Madly Guilty by Liane Moriarty
8. Night School: A Jack Reacher Novel by Lee Child
9. The Black Widow: Book 16 of Gabriel Allon Series by Daniel Silva
10. Diary of a Wimpy Kid # 11: Double Down by Jeff Kinney
11. 15th Affair (Women's Murder Club) by James Patterson and Maxine Paetro
12. Before the Fall by Noah Hawley
13. Fool Me Once by Harlan Coben
14. Crisis of Character: A White House Secret Service Officer Discloses His Firsthand Experience with Hillary, Bill, and How They Operate by Gary J. Byrne
15. The Wrong Side of Goodbye: A Harry Bosch Novel by Michael Connelly
16. The Magnolia Story by Chip Gaines and Joanna Gaines
17. The Nest by Cynthia D’Aprix Sweeney
18. One with You: Book 5 of A Crossfire Series by Sylvia Day
19. The Obsession by Nora Roberts
20. Everything We Keep by Kerry Lonsdale