The weekend box office boiled down to a competition between two very different kings: Steven Spielberg, who has reigned over the film business for more than 40 years, and Jeff Bezos, the Amazon titan who would love to add Hollywood to his list of conquered lands.

It was not a happy outcome for Amazon, to put it mildly.

“The House With a Clock in Its Walls,” produced by Amblin Entertainment, Mr. Spielberg’s company, was the No. 1 movie at North American theaters, taking in roughly $27 million and surpassing prerelease analyst expectations. The PG-rated movie, which cost about $42 million to make (not including marketing costs) and was released by Universal, harkens back to Amblin hits from the 1980s like “The Goonies” and “Harry and the Hendersons” — live-action movies in which ordinary children find themselves in extraordinary circumstances.

Starring the young Owen Vaccaro as an orphan and Jack Black as a secretly benevolent warlock, “The House With a Clock in Its Walls” was directed by Eli Roth, who is known for R-rated films like “Hostel” and “Death Wish.” Cate Blanchett co-stars.

[Read our review: “The House With a Clock in Its Walls” is demented fun]

But audiences rejected the weekend’s other new wide-release movie: “Life Itself,” which was booked into 2,609 theaters by Amazon Studios, arrived in 11th place, with ticket sales of about $2.1 million, according to comScore, which compiles box-office data. “Life Itself,” a romantic drama, was written and directed by Dan Fogelman, the creative force behind the hit NBC drama “This Is Us.”