LOS ANGELES — A femme-fueled comedy beat a superhero blockbuster at the box office this weekend.

After holding the top position for three weeks, "Captain America: The Winter Soldier" has been topped by "The Other Woman" for the No. 1 spot.

Fox's revenge comedy, starring Cameron Diaz, Leslie Mann and Kate Upton, debuted with $24.7 million, while Disney-Marvel's "Captain America," led by Chris Evans, grossed $16 million in its fourth weekend, bringing its domestic total to $225 million.

The PG-13 rating of the Nick Cassavetes-directed "The Other Woman" — about three women wronged by a three-timing spouse played by Nikolaj Coster-Waldau of "Game of Thrones" — helped it draw a larger audience, said Paul Dergarabedian, senior media analyst of box-office tracker Rentrak.

"The rating was perfect," he said. "If you are going for the mainstream audience who is looking for something that has a little bit of an edge, but not too much, you can hit that sweet spot and draw a large audience."

The release date couldn't have been better, Dergarabedian also noted. "This was the perfect time to release this film, between the success of 'Captain America' and before the official start of the summer movie season with 'Spider-Man 2.' "

Hollywood hasn't yet seen a comedy do especially well at the box office in 2014 since "Ride Along," which was released in January. Wes Anderson's "The Grand Budapest Hotel" exceeded expectations, however, making over $131 million worldwide.

But Jason Bateman's "Bad Words" made only $7.7 million domestically overall. Tyler Perry's "The Single Moms Club" brought in just $16 million domestically. Most of his films have grossed over $40 million domestically. Marlon Wayans' sequel "A Haunted House 2" opened with $8.8 million, drastically down from the original's $18 million debut.

"Sometimes it's about casting," Dergarabedian said. "When you have Cameron Diaz in a comedy like this, it's hard not to knock it out of the park. This film is right in her wheelhouse. This is what she does best."

While Diaz's last film, a thriller called "The Counselor," grossed only $17 million domestically last year, her foul-mouthed 2011 comedy "Bad Teacher" earned over $100 million stateside.

"The Other Woman" scored $12.8 million internationally, bringing its worldwide total to $45.3 million.

"Captain America" has now hit over $645 million globally, surpassing its 2011 original "The First Avenger," which earned $370 million. The sequel is the highest-grossing April release ever.

Sony's faith-based "Heaven Is for Real," starring Greg Kinnear, held the third-place position with $13.8 million after opening in the same slot last weekend behind leaders "Captain America" and Fox's animated "Rio 2," which drifted down to fourth place with $13.7 million. (Notably, Mann, who voices a character in "Rio 2," now has two films in the top five this weekend.)

Relativity Media's action crime drama "Brick Mansions," starring the late Paul Walker, was No. 5 with $9.6 million. The film was one of the last Walker completed before he died in a car accident in November. It's a solid debut for "Brick Mansions" after the film was pushed back from its original release date in February.

To finish "Fast & Furious 7," which will be released April 2015, Walker's brothers, Caleb and Cody Walker, have stepped in to complete their brother's action scenes. In one of his first interviews since the announcement from Universal Pictures, the studio behind the "Fast & Furious" franchise, Cody Walker broke down in tears when talking on Fox's Baltimore TV affiliate about his late brother's charitable work last week.

Johnny Depp's sci-fi disappointment "Transcendence" dropped from No. 4 to No. 6 in its second weekend, earning $4.1 million. The Warner Bros. film is Depp's third consecutive flop after 2013's Western "The Lone Ranger," in which he played Tonto, and 2012 quirky vampire flick "Dark Shadows."

Could the A-lister be losing his appeal at the box office? Depp's last film to exceed $100 million domestically was "Pirates of the Caribbean: On Stranger Tides" in 2011. Perhaps his upcoming Disney fantasy "Into the Woods," also starring Meryl Streep, will fare better.

Debuting in only four locations, A24 Films' "Locke" took the weekend's highest per-screen average with $22,303. Overall, the drama starring Tom Hardy earned $89,210. The film, which sees Hardy spend 85 minutes in a car on the phone while tackling a series of events jeopardizing his carefully patterned existence, is being called one of his best performances. AP National Writer Jocelyn Noveck called Hardy's portrayal of construction manager and family man Ivan Locke "admirably restrained, in a situation when overacting must have been a constant temptation."

Also this month, A24 released the sci-fi film "Under the Skin" featuring Scarlett Johansson. It opened slightly higher with $133,154 domestically, reaching a total of over $1.5 million.

Also opening this weekend was Lionsgate's "The Quiet Ones," starring Jared Harris ("Mad Men") as an Oxford professor who recruits students to conduct an experiment to prove supernatural abilities exist. The horror film's take was a mere $4 million.

Next weekend, Sony-Marvel's "The Amazing Spider-Man 2" kicks off the summer movie season with its domestic debut. The 18 weeks of summer constitutes on average 40 percent of the year's box-office earnings, Dergarabedian said.

"Spider-Man 2" has already premiered internationally in locations like South Korea and Russia. In its second weekend of international release, it made $132 million.

Estimated ticket sales for Friday through Sunday at U.S. and Canadian theaters, according to Rentrak. Final domestic figures will be released on Monday:

1. "The Other Woman," $24.7 million ($12.8 million international).

2. "Captain America: The Winter Soldier," $16 million ($16 million international).

3. "Heaven Is for Real," $13.8 million.

4. "Rio 2," 13.7 million ($27.5 international).

5. "Brick Mansions," $9.6 million ($1.6 million international).

6. "Transcendence," $4.1 million ($10.8 million international).

7. "The Quiet Ones," $4 million ($275,000 international).

8. "Bears," $3.6 million ($100,000 international).

9. "Divergent," $3.6 million ($9.7 million international).

10. "A Haunted House 2," $3.3 million ($1 million international).

___Estimated ticket sales for Friday through Sunday at international theaters (excluding the U.S. and Canada) for films distributed overseas by Hollywood studios, according to Rentrak:

1. "The Amazing Spider-Man 2," $67.2 million.

2. "Rio 2," $27.5 million.

3. "Captain America: The Winter Soldier," $16 million.

(tie) "My Old Classmate," $16 million.

1. "The Other Woman," $12.8 million.

2. "Noah," $11.1 million.

3. "Iceman 3D," $11 million.

4. "Transcendence," $10.8 million.

5. "Divergent," $9.7 million.

6. "Qu'est ce qu'on a fait au Bon Dieu?!," $8.5 million.

7. "Frozen," $7.2 million.