ATLANTA – It sits there on his permanent NFL record like a small, stubborn stain on an otherwise lovely shirt.

In between Nick Foles’ fabulous 27-touchdown, two-interception Pro Bowl season with the Eagles in 2013, and his 2017 magic carpet ride from the bench to Super Bowl MVP last February, there was 2015.

Because Foles believes God does everything for a reason, he’s never going to cry the blues about his one forgettable season with the Rams, even if it did nearly drive him out of football.

“I was meant to come to this team for a reason,’’ Foles told the Daily News in the summer of 2015. “I’m going to give this team everything I have, just like I did in Philly. I want to impact the locker room, impact my teammates and create a culture where we can succeed.’’

He loved Philadelphia. Thought he was going to be the team’s starting quarterback for the foreseeable future.

But Chip Kelly had other ideas. Playing behind an injury-ravaged offensive line, Foles didn’t play nearly as well in 2014 as he had in ’13. Out of the blue, Kelly shipped him to the Rams for Sam Bradford in March 2015.

The Rams were entering their final season in St. Louis and the fourth year of the Jeff Fisher era, which had yet to produce a playoff appearance or winning record. They had lost 10 games the previous year.

They opened the 2015 season with an offensive line that included rookies at right guard and right tackle, a fourth-year center with four career starts, and a left tackle – Greg Robinson – who had given up a team-high seven sacks and nine quarterback hits the previous season.

Foles never had a chance. The line didn’t protect him, and his receiving corps was one of the worst in the league.

The team’s offensive coordinator, Brian Schottenheimer, resigned two months before Foles arrived, opting to become the offensive coordinator at the University of Georgia. Fisher replaced him with the team’s quarterbacks coach, Frank Cignetti, whose previous career stop had been at Rutgers.

“I just don’t think we had the right combination to be successful,’’ said Rams left guard Rodger Saffold, who started the first five games, then missed the rest of the season with a shoulder injury, weakening the Rams’ line even further that year.

“Sometimes, it’s really important to have the right coach to be able to coach somebody. You look at Nick, he had his blunders that year, but comes back and becomes a Super Bowl MVP. I mean, that’s huge.

“You look at Nick. You look at Case Keenum [who opened the season as Foles’ backup]. You look at the guys who really played well after they left here, you have to think it comes down to the coaching and being able to be in the right situation to maximize your abilities.’’

Things didn’t go south right away for Foles. The Rams actually won four of their first seven games that year.

Foles threw for 297 yards in a Week 1 win over Seattle. Threw just one interception in his first four starts and had a three-touchdown performance in a 24-22 win over Arizona in Week 4.

Then, in Week 5, he threw four interceptions in a 24-10 road loss to Green Bay. Threw just one touchdown pass in the next six games, four of which the Rams lost.

In an ugly 27-3 Week 13 home loss to the Cardinals, Foles completed just 15 of 35 passes for 146 yards.

And that was that.

That week, Fisher benched Foles and fired Cignetti. Keenum replaced Foles and guided the Rams to three wins in the final four games.

In his 11 starts with the Rams, Foles had a career-worst 69.0 passer rating. He had just seven touchdown passes and 10 interceptions in 337 pass attempts.

After that 297-yard performance in the season opener, he threw for more than 200 yards just once more in his other 10 starts.

“It’s hard to figure,’’ said Rams right tackle Rob Havenstein, who was a rookie starter on that team. “Nick is a terrific quarterback. You saw that with the Eagles. I don’t know what happened that year. I’m just glad it all worked out for him. He’s a really good guy.

“He helped me out a lot. I was just a rookie. But he was very personable, and I could ask him a whole bunch of questions on game day or during the week, and he’d take the time to sit and talk to me and explain things that maybe I didn’t understand.’’

The Rams finished 7-9 and it was pretty obvious to Foles that he didn’t fit into the team’s long-term plans -- particularly after they traded up in the draft that April and selected Jared Goff with the first overall pick.

Foles asked for, and eventually received, his release. He spent a couple of weeks contemplating retirement before signing with the Kansas City Chiefs and his former Eagles coach, Andy Reid.

After spending a year backing up Alex Smith, he signed with the Eagles. The rest, as they say, is history. Foles ended up leading the Eagles to their first-ever Super Bowl title in 2017 after replacing injured Carson Wentz. And Goff and the Los Angeles Rams will face the New England Patriots Sunday in Super Bowl LIII.

Rams linebacker Bryce Hager, who was a rookie on the 2015 team, was a childhood friend of Nick’s in Austin, Texas. Foles and Bryce’s older brother were teammates at Austin Westlake High School.

He was excited when he was drafted by the Rams in the seventh round and realized he was going to be on the same team with Foles. He was equally sad when it didn’t work out and Foles was released.

“There’s a lot of factors that go into it,’’ he said. “It’s too bad it didn’t work out. But he’s been doing great ever since.’’