Tyler Perry’s “A Madea Family Funeral” is challenging “How to Train Your Dragon: The Hidden World” for the top spot at the domestic box office, early estimates showed on Friday.

The 11th installment of Lionsgate’s Madea franchise is performing at the top end of expectations, with an opening of about $23 million at 2,442 sites on Friday. “How to Train Your Dragon 3” was pegged to finish with about $24 million at 4,296 venues, a 56% decline that would give it a repeat victory at the North American box office and $90 million in its first 10 days.

Fox’s third weekend of “Alita: Battle Angel” is leading the rest of the pack with about $6 million at 3,096 locations. Focus Features’ launch of the thriller “Greta,” starring Isabelle Huppert and Chloe Grace Moretz, is in line with forecasts, with about $5 million at 2,409 venues. It will be contending for fourth place with Warner Bros.’ fourth weekend of “The Lego Movie 2: The Second Part.”

“A Madea Family Funeral” is Perry’s swan song to his long-running Madea character, which dates back two decades to his 1999 play “I Can Do Bad All By Myself.” The feisty Madea first appeared on the big screen in 2005’s “Diary of a Mad Black Woman.” “Madea Goes to Jail” had the top launch in the series, debuting with $41 million in 2009.

“Funeral” — which Perry directed, wrote, and produced — is set in the backwoods of Georgia, where a family reunion becomes an unexpected funeral. As usual, Perry portrays multiple characters, and regulars Patrice Lovely and Cassi Davis return. Ozzie Areu, Will Areu, and Mark E. Swinton are also produced the pic.

The post-Oscars weekend is also seeing expansions for Universal’s “Green Book,” Sony’s “Spider-Man: Into the Spider-Verse,” and Warner Bros.’ “A Star Is Born,” with a one-week re-release with 12 minutes of new footage.

“Green Book,” which won the best picture Oscar, will take in between $4 million and $5 million at 2,641 locations. That should push its North American haul past $75 million.

The weekend is partly a prelude to Disney’s “Captain Marvel,” which is expected to deliver the first $100 million-plus opening weekend of the year when it flies into theaters next weekend — and revive a sagging domestic box office.

Overall North American moviegoing is down a stunning 27% for 2019, to $1.42 billion, according to Comscore, and February has slid by 38%. That’s the biggest year-to-year decline since 1990, due to the massive take from last year’s “Black Panther.”

“The decline is unprecedented because there had never been a movie like ‘Black Panther’ released in February,” noted Paul Dergarabedian, senior media analyst with the box office tracker.

The gap will widen by the end of the weekend, given that the year-ago frame saw the third weekend of “Black Panther” reel in $66 million to lift its total domestic take past $500 million.