The World War II film "Midway" has scored a surprise victory at the box office over "The Shining" sequel "Doctor Sleep" this weekend.

Lionsgate on Sunday says the war epic from director Roland Emmerich earned an estimated $17.5 million in North American theaters to take the top spot on the charts.

Going into the weekend, experts expected the No. 1 spot would go to Warner Bros.' "Doctor Sleep," the high-profile Stephen King adaptation starring Ewan McGregor. But audiences slept on the well-reviewed film and it grossed only $14.1 million from over 3,800 locations. "Doctor Sleep" was expected to open over to $25 million.

This image released by Warner Bros. Pictures shows Ewan McGregor in a scene from "Doctor Sleep." (Warner Bros. Pictures via AP)

This image released by Warner Bros. Pictures shows Ewan McGregor in a scene from "Doctor Sleep." (Warner Bros. Pictures via AP)

The John Cena-led "Playing With Fire" opened in third place with $12.8 million, while the romantic comedy "Last Christmas" starring Emilia Clarke took fourth with $11.6 million.

This image released by Universal Pictures shows Emilia Clarke in a scene from "Last Christmas." (Jonathan PrimeUniversal Pictures via AP)

This image released by Universal Pictures shows Emilia Clarke in a scene from "Last Christmas." (Jonathan PrimeUniversal Pictures via AP)