Fox's "Hidden Figures" pulled off a surprise at the North American box office, beating Lucasfilm's "Rogue One: A Star Wars Story" into second place, industry data released on Monday showed.
Early estimates had indicated the "Star Wars" spin-off would hold onto top spot for a fourth consecutive week but the final numbers showed a reversal, with "Hidden Figures" winning the race by a slim margin of just over $700,000.
The biographical comedy-drama, based on a book of the same name, got a wide release of nearly 2,500 theaters in its third week and netted $22.8 million.
Starring Taraji P. Henson, Octavia Spencer and Janelle Monae, it recounts the story of African-American mathematicians who helped NASA put the first men in space, while dealing with segregation in the workplace.
"The Force was with us. It took over 50 years to tell the story of these 3 brilliant African American female protagonists... This weekend we only had 2,471 theaters, while 'Rogue One' had 4,157 locations," Monae told her 1.3 million Instagram followers.
The first stand-alone episode in the eight-film "Star Wars" series, "Rogue One" follows the mission of rebel alliance fighters trying to steal plans to the Empire's feared Death Star.
The movie pulled in $22 million over the weekend, according to box office monitor Exhibitor Relations, bringing its four-week total to $477.4 million.
Universal's animated musical "Sing" fell to third, with a $20.7 million take over the weekend and an accumulated total of $214.5 million.
The actors who voice the cartoon characters -- Matthew McConaughey, Scarlett Johansson and Reese Witherspoon -- also do their own singing.
The horror film "Underworld: Blood Wars," starring Kate Beckinsale as a vampire death dealer clinched fourth place with $13.7 million in its debut weekend.
"La La Land," a nostalgic tribute to the Golden Age of Hollywood musicals, took fifth with $10.1 million, bringing its cumulative receipts after five weeks to $51.8 million.
The whimsical film featuring Ryan Gosling and Emma Stone won a record-breaking seven statuettes at Sunday's Golden Globes, considered the launch of the entertainment industry's awards season.
Rounding out the top ten were:
"Passengers" ($8.8 million)
"Why Him?" ($6.9 million)
"Moana" ($6.4 million)
"Fences" ($4.8 million)
"Assassin's Creed" ($4.2 million)