“Captain Marvel” is the predecessor of “Avengers: Endgame,” and fans knew the two would somehow connect. The movie, out now, and its first post-credits scene make it clear that calling Carol Danvers is a last-ditch effort to save the universe.

During the film, Brie Larson’s superhero gives Nick Fury (Samuel L. Jackson) a pager that she says will have a connection even a couple of galaxies away. However, she warns him not to use it unless it’s a real emergency.

As fans saw in the “Avengers: Infinity War” end credits scene, watching half of all life just disappear was finally enough of an emergency to call Captain Marvel. Unfortunately, Fury faded to dust before he could tell anyone what to expect.

The “Captain Marvel” post-credits scene shows the Avengers — or at least what’s left of them. Captain America (Chris Evans) and Black Widow (Scarlett Johansson) are looking at the number of the missing going up.

War Machine (Don Cheadle) tells them that the pager stopped blinking. Bruce Banner (Mark Ruffalo) says that the signal stopped, and Cap demands they reboot it. Black Widow says they need to know who is on the other end of that line.

When Nat turns around, she is face-to-face with Carol. The pilot looks a little different, with an updated suit and haircut. She looks understandably concerned as she asks, “Where’s Fury?”

A title card appears, noting that Captain Marvel will return in “Avengers: Endgame.”

The pager and post-credits scene aren’t the only connection “Captain Marvel” has to “Avengers: Endgame,” though. The Tesseract, AKA the space stone in Thanos’ (Josh Brolin) Infinity Gauntlet, turned out to be what was powering the light speed engine that Carol was testing in 1989. After the aircraft was taken down, an explosion left Carol with no memories and lots of powers. While Yon-Rogg’s Kree blood may have helped her survive, it looks like the majority of her powers are actually from the space stone.

It’s clear that Captain Marvel is coming to help the Avengers in “Endgame,” but how exactly will she help? There’s the theory that she’ll rescue Iron Man (Robert Downey Jr.), and there are also rumors that she might be capable of time travel (though actor Samuel L. Jackson has since backtracked and claimed he made that up). Some even think she might be the one to take out Thanos. Fans will have to wait and see.

What is obvious, however, is that Captain Marvel will show up relatively early in the movie. The post-credits scene shows numbers on the screen rising, so it’s clearly just after Thanos’ decimation. The “Avengers: Endgame” trailer shows Captain America without a beard and Black Widow with longer hair, but in this clip, they both look just as they did in Wakanda. It looks like even Captain Marvel won’t have a quick fix for the destruction Thanos caused.

“Avengers: Endgame” hits theaters April 26.

Captain Marvel Endgame
Captain Marvel will appear in "Avengers: Endgame," but will she be able to defeat Thanos? Marvel Studios