Warning: There are major spoilers ahead for "Avengers: Endgame."

One of the most emotional lines to come out of "Endgame" is "I love you, 3,000."

According to screenwriters Christopher Markus and Stephen McFeely, the line was originally different. It was changed to 3,000 because of some inspiration on Robert Downey Jr.'s part.

During a conversation at the 92Y in New York City Thursday, which Insider attended, the two explained it's a line Downey Jr.'s children say to him. So they allowed it in the final film.

During a watch party for the film, Robert Downey Jr. joined co-director Joe Russo on Instagram Live to say it was something his son would say to him.

Visit Insider's homepage for more stories.

One of most memorable lines of dialogue to come from "Avengers: Endgame" is from an exchange between Tony Stark (played by Robert Downey Jr.) and his daughter, Morgan. As she goes to bed, she tells her father, "I love you, 3,000." The line is reiterated later in the movie as part of one of the film's most emotional moments.

After the movie's release, "I love you, 3,000" has become ubiquitous among Marvel fans, with many sharing the line on social media as a way to thank both Marvel Studios and Robert Downey Jr. for more than a decade of movies in the Marvel Cinematic Universe.

What was the inspiration for "I love you, 3,000"?

"Robert [Downey Jr.]," said "Endgame" screenwriter Stephen McFeely during a conversation at the 92Y in New York City in May 2019, which Insider attended.

"The line went, 'I love you tons. I love you tons,'" said McFeely of the original version of the line in "Endgame." "And so, he says, 'I love you tons,' but his children say to him, 'I love you, 3,000.'"

"In real life," "Endgame" screenwriter Christopher Markus clarified.

Christopher Markus (center) with Stephen McFeely (right) in conversation Thursday evening at the 92Y with the NYT's Dave Itzkoff. Andrea Klerides / Michael Priest Photography

During a watch party hosted by Comicbook.com to celebrate the film's one-year anniversary, Robert Downey Jr. appeared on Instagram live with "Endgame" co-director Joe Russo to expand upon the famous line a little more.

"I know it was something I think Exton, I think my now 8-year-old, used to say me," Downey Jr. told Russo when asked about the moment. "A lot of kids say it. It's before they can quantify love."

"They just think of the biggest number they know — 2,000 or 3,000. It turned out to be really signficant," he added.

During the hour-long conversation with New York Times' reporter Dave Itzkoff in 2019, the screenwriting duo recounted their journey from meeting at University of California, Davis, to working on the "Chronicles of Narnia" franchise at Walt Disney Studios, and, eventually the first "Captain America" movie.

Read more: Ranked: The most heart-wrenching moments in 'Avengers: Endgame,' from tear-worthy to full on sob fest

The two have written screenplays for several Marvel movies, including the two last "Avengers" movies. After years of working with "Avengers: Endgame" co-directors and brothers Anthony and Joe Russo, the two will continue their working relationship at a studio they started with the brothers.

Though McFeely said they're executive producing a number of "bigger" projects there, Markus teased the two have been contacted about another potential Marvel project.

McFeely, hesitant to say anything more, said it may be best for them to take a breather for a while after spending the past five or so years with Marvel Studios.

"[Marvel] should really get some fresh blood in there," said McFeely. "We're a couple of tired old mules."

You can follow along with our "Endgame" coverage here.