WASGHINGTON-In a surprise upset, Downton Abbey won the crowded weekend box office race with a better-than-expected $31 million from 3,079 theaters, royally beating the final installment in Sylvester Stallone’s iconic Rambo action franchise and a new space thriller featuring one of the world’s biggest movie stars, Brad Pitt.

Pitt’s Ad Astra did manage to edge past Stallone’s Rambo: Last Blood with an estimated $19.2 million from 3,460 locations. Last Blood took in $19 million from 3,618 cinemas, the widest count of the three new films. It’s possible the order could change when final weekend numbers are tallied Monday.

Rambo: Last Blood grossed an estimated $19 million from 3,618 theaters, and Ad Astra each earned an estimated $19 million to tie for No. 2.

Overseas, Downton Abbey is also serving up nice business, earning $30.8 million to date from its first 32 markets for an early global haul of $61.8 million against a modest $13 million production budget before marketing. It’s amassed $15 million in the U.K., where it first strutted into theaters last weekend. In the U.S., Downton Abbey marks the biggest opening of all time for specialty distributor Focus Features, and is a testament to the buying power of older moviegoers. More than 50 percent of the audience was 45 and older — including 32 percent over 55.

The continuation of the popular British show posted one of the best showings in recent years for a TV-to-movie adaptation outside of the Mission: Impossible and Star Trek franchises. As a way of comparison, Entourage — which likewise featured the cast of the TV show — fell flat with a $10.3 million debut in 2015.

Filmmaker James Grey’s Ad Astra — buoyed by high-profile debut at the Venice Film Festival and its A-list star — performed slightly ahead of expectations. Disney inherited the $80 million movie, produced by New Regency, when taking over the 20th Century Fox film empire. Overseas, Ad Astra opened in much of the world this weekend, grossing $26 million from 44 markets for a global blast off of $45.2 million. It did big business on Imax screens, which accounted for $6.6 million. Among the three new films, Ad Astra played the youngest, with 34 percent of ticket buyers ages 18 to 34. It also played the most evenly among the gender, even while skewing slightly male (54 percent).

Lionsgate and Millennium’s Rambo: Last Blood is being billed as the final title in the 37-year-old franchise that, along with Rocky, turned Stallone, now 73, into a global action brand. It opened on par with the last installment, Rambo, which debuted domestically to $18.2 million in 2008, not adjusted for inflation.

Males made up the majority of those turning out to see the R-rated action pic (64 percent), while 77 percent were 25 and older, including 49 percent over 35. This time out, the titular character takes on a Mexican drug cartel in a deadly journey of vengeance. Adrian Grunberg directed from a script by Matthew Cirulnick and Stallone.

Downtown Abbey was graced with an A CinemaScore, followed by a B for Rambo and a B- for Ad Astra.