NEW YORK — The R-rated spy comedy “Kingsman: The Golden Circle” displaced the horror sensation “It” as the No. 1 film in North America, while the second “Lego Movie” spinoff of the year didn’t assemble the expected audience.

The 20th Century Fox release opened with a weekend-leading $39 million debut, according to studio estimates Sunday. But “It” still continues to pull in record crowds. With $30 million over the weekend, “It” is now the highest-grossing horror film of all time, not accounting for inflation, with $266.3 million thus far. (1973’s “The Exorcist” grossed $232.9 million domestically, or more than $1 billion in 2017 dollars.)

Twentieth Century Fox’s “Kingsman” sequel sought to expand on the 2015 original’s $36.2 million opening, and its $414 million worldwide take. Matthew Vaughn’s sequel returned stars Taron Egerton and Colin Firth, while adding Channing Tatum, Halle Berry and others. Made more for audiences than critics, reviews for the gleefully distasteful spy romp were poor, at 51 per cent fresh on Rotten Tomatoes.

Fox could celebrate an uptick the second time around, albeit a small one. “The Golden Circle” also debuted with $61 million overseas, giving it a $100 million global weekend. Vaughn is planning a third “Kingsman” film.

“We’re seven per cent bigger than the last one, which opened on a holiday weekend,” said Chris Aronson, distribution chief for Fox. “We grew the franchise. We’re very happy.”

The Stephen King adaptation “It,” from Warner Bros. and New Line, may have slightly eaten into the ticket sales for “Kingsman.” Few believed “It” would still be such a draw in its third week of release; horror films usually drop severely after release. But the film has already established itself as the biggest hit ever in the month of September — a welcome relief to Hollywood after a dismal August.

The “Lego Movie” spinoff “The Lego Ninjago Movie,” was further off expectations, debuting with $21.2 million. Phil Lord and Chris Miller’s “The Lego Movie” — the 2014 hit that made $469 million worldwide — kicked off a bustling franchise. “Ninjago,” though, is the second spinoff of the calendar year, following February’s “The Lego Batman Movie.”

That release opened with $35 million and grossed $312 million in total — marks that “Ninjago” appears will fall well short of. It may be two “Lego” movies in a year were too many.

“I was hoping we’d do more. I’m disappointed this weekend didn’t come in a little higher,” said Jeff Goldstein, Warner Bros. distribution head. “We know that each one of these ‘Lego’ movies are different properties. This one played young.”

In its second week of release, Darren Aronofsky’s already infamous psychological thriller “mother!” failed to turn the tide. The film, made for $30 million, last week became one of the few movies to receive an “F” CinemaScore on release. The horror parable, starring Jennifer Lawrence, slid to sixth place with $3.3 million, bringing its two-week haul to $13.4 million. Paramount has proudly defended the film as intentionally divisive, daring filmmaking, the kind seldom produced by major studios.

The week also saw the first wave of fall awards contenders in specialty release. The Billie Jean King-Bobby Riggs drama “Battle of the Sexes,” with Emma Stone and Steve Carell; the Boston Marathon bombing survivor tale “Stronger,” with Jake Gyllenhaal; and the Queen Victoria drama “Victoria & Abdul,” starring Judi Dench, all debuted in limited release.

Lionsgate’s “Stronger” grossed $1.7 million on 574 screens. Focus Features’ “Victoria & Abdul” scored a per-theatre average of $37,933 on four screens, along with a two-week international total of $12.4 million. And Fox Searchlight’s “Battle of the Sexes” earned $525,000 on 21 screens.

Theaters are suddenly flush again. Though the year is still 4.6 per cent behind the pace of 2016, the month of September is up 20 per cent, according to comScore.

“The fact that we’re sitting here in September on the verge of what looks like a record-breaking month, powered by the unprecedented success of ‘It,’ tells you how quickly box-office fortunes can rise and fall in this marketplace,” said Paul Dergarabedian, senior media analyst for comScore.

Estimated ticket sales for Friday through Sunday at U.S. and Canadian theatres according to comScore. Where available, the latest international numbers also are included. Final domestic figures will be released Monday.

1. “Kingsman: The Golden Circle,” $39 million ($61 million international).

2. “It,” $30 million ($38.3 million international).

3. “The Lego Ninjago Movie,” $21.2 million ($10.5 million international).

4. “American Assassin,” $6.3 million ($2.7 million international).

5. “Home Again,” $3.3 million.

6. “mother!” $3.3 million ($4.6 million international).

7. “Friend Request,” $2.4 million.

8. “The Hitman’s Bodyguard,” $1.9 million ($15.4 million international).

9. “Stronger,” $1.7 million.

10. “Wind River,” $1.3 million.

___

Estimated ticket sales for Friday through Sunday at international theatres (excluding the U.S. and Canada), according to comScore

1. “Kingsman: The Golden Circle,” $61 million.

2. “It,” $38.3 million.

3. “War for the Planet of the Apes,” $19.3 million.

4. “The Hitman’s Bodyguard,” $15.4 million.

5. “The Lego Ninjago Movie,” $10.5 million.

6. “The Invisible Guest,” $6.5 million.

7. “American Made,” $6 million.

8. “Spider-Man: Homecoming,” $6 million.

9. “I Can Speak,” $4.8 million.

10. “mother!” $4.6 million.

___

Follow AP Film Writer Jake Coyle on Twitter at: https://twitter.com/jakecoyleAP

Jake Coyle, The Associated Press