(L-R) Chris Evans and Robert Downey Jr. speak onstage during the Los Angeles World Premiere of Marvel Studios' 'Avengers: Endgame' at the Los Angeles Convention Center on April 23, 2019 in Los Angeles, California.

"Avengers: Endgame" is now the highest-grossing film of all time.

On Sunday, Disney said the film had earned $2.79 billion at the global box office, topping "Avatar's" record of $2.7897 billion.

"Endgame" has been in theaters for just 87 days. "Avatar," for comparison, ran for 234 days during its first run, and was then rereleased in 2010.

"Endgame" had its own rerelease, of sorts, in June. Marvel Studios began showing a new theatrical release of the film with a special tribute to Stan Lee, a deleted scene from "Endgame" and a teaser for "Spider-Man: Far From Home" at the end of the credits.

The hope was to drive buzz and lure moviegoers back to theaters to see the film again. At the time, "Endgame" was still $40 million behind "Avatar" and there were questions about whether the film would be able to overtake the record before the end of the summer.

"'Avatar' was a tenacious king of the box office mountain warding off all challengers for about a decade and against seemingly insurmountable odds, 'Endgame' did whatever it took to take the crown," Paul Dergarabedian, senior media analyst at Comscore said.

On Saturday, Kevin Feige, the head of Marvel Studios announced to a crowd of thousands in Hall H at San Diego Comic-Con that the film was within a few days of overtaking "Avatar."