It was a close battle, but in the end, the real-life space aces of Hidden Figures won the box office this past weekend.

The based-on-fact story follows a group of female African-American mathematicians who played a crucial role in the American space program of the 1960s. The film sold $22.8 million worth of tickets during the period, according to ComScore. It's a fresh release from Twenty-First Century Fox (NASDAQ: FOX) (NASDAQ: FOXA) division 20th Century Fox.

In second place was a very different type of space epic, Rogue One: A Star Wars Story. Released by Walt Disney last month, it was close behind the ladies of Hidden Figures this past weekend with a box office tally of around $22.0 million. This puts its domestic total so far at over $477 million; in foreign markets, it's reaped more than $437 million.

Third place belonged to the animated tale Sing, distributed by Universal. A solid performer since its release just before Christmas, the movie reaped almost $19.6 million in domestic box office over the weekend. That put its U.S. total at $213 million, while its foreign take stands at nearly $144 million -- a very healthy return on the estimated production budget of $75 million.

Rounding out the top four was a franchise release from Sony and its division Screen Gems: Underworld: Blood Wars. The violent werewolves vs. vampires saga's latest installment, which made its debut on Friday, took in over $13 million. That, however, was the lowest opening-weekend tally for any of the series' films.

Weekend one of 2017 showed that Disney's dominance over the box office has a good chance of continuing. Meanwhile, the success of Hidden Figures surely gives Fox some renewed confidence, as the studio had only one film (Deadpool) among 2016's top 10 performers. Fox's next most popular film that year was X-Men: Apocalypse, which was some distance down the list at No. 16.

10 stocks we like better than Twenty-First Century Fox
When investing geniuses David and Tom Gardner have a stock tip, it can pay to listen. After all, the newsletter they have run for over a decade, Motley Fool Stock Advisor, has tripled the market.*

David and Tom just revealed what they believe are the 10 best stocks for investors to buy right now... and Twenty-First Century Fox wasn't one of them! That's right -- they think these 10 stocks are even better buys.

Click here to learn about these picks!

*Stock Advisor returns as of January 4, 2017

Eric Volkman owns shares of Walt Disney.

Want to learn how to invest?

Get a free 10 week email series that will teach you how to start investing.

Delivered twice a week, straight to your inbox.