Disney’s latest Avengers film has smashed box-office records on its opening weekend taking $1.2bn (£1bn) and is on track to overtake Avatar as the highest-grossing film of all time.

Avengers: Endgame took a record $350m in the world’s biggest movie market, North America, smashed records for a foreign film in China, and grossed more than any other film on its opening weekend globally.

The star-studded film is the first to take more than $1bn on its debut. Avatar, released in 2009, currently holds the record for highest-grossing film with $2.79bn worldwide. At the very least, Avengers: Endgame will almost certainly surpass Titanic, the 1997 blockbuster starring Leonardo DiCaprio and Kate Winslet, which ranks as the second biggest film of all time, taking $2.19bn globally.

The success of the film is a timely reminder that Disney’s upcoming streaming service, Disney+, has the content firepower to challenge global market leader Netflix despite its late entry. Avengers: Endgame is one of many golden properties that will debut exclusively on the service, which launches later this year, before being released elsewhere. Disney has already pulled all of its content from Netflix in the US, ahead of a likely global pullout, costing the company hundreds of millions of dollars in licensing revenue in order to make its service a must-buy. In the US, subscriptions to Disney+ will be priced at $6.99 a month, just over half the monthly cost of Netflix, with a global rollout beginning next year.

The success of Avengers: Endgame is the culmination of 21 films in the Marvel superhero universe that started with Robert Downey Jr’s Iron Man in 2008. Disney acquired Marvel in 2009 for $4bn, an acquisition criticised at the time as too highly priced, given that Marvel had licensed off a number of its then-major franchises, such as Spider-Man and X-Men, when the company was cash-strapped in the 1990s.

The success of the film is a reminder that movie-going remains hugely important, even in the much-hyped on-demand era, with the UK last year enjoying its best cinema attendance since 1971.