Thanks to “Guardians of the Galaxy” and “The Lego Movie,” Chris Pratt was the biggest movie star of 2014. So what in a million galaxies is he doing playing fourth banana on the seventh and final season of the critically acclaimed but lowly rated “Parks and Recreation”?

“It’s funny you should ask that, because it never occurred to me that I would leave this show,” the Minnesota-born actor said shortly before the sitcom wrapped up its finale, which airs Tuesday night.

“I don’t care how much money someone would offer me. I wouldn’t abandon ship. This team was awesome and the process of making this show spoke to me and was so perfect in the way I like to work. It’s loose, it’s fun and you get to try something new every take.”

Pratt’s passion is understandable.

While “Parks” never attracted a significant audience — it ranked 115th in network TV last season with fewer than 4 million viewers a week — it managed to create subtle, sassy comedy for a small but die-hard base that appreciated the show’s sweet, chewy center and characters unashamed to embrace their love of small-town America.

“It’s that cult audience from the nerd belt that kept it alive,” said Mo Collins, the Minneapolis-raised actress who appeared in 20 episodes as Joan Callamezzo, a TV reporter in fictional Pawnee, Ind., who constantly tries to spoil the efforts of the sitcom’s protagonists. “You look at shows on cable and there’s a lot of smart writing out there. Networks are operating from a fear base where it’s all about playing the popularity game. ‘Parks’ was never really about that.”

The sitcom had a rough start.

In the first season after its 2009 premiere, writers had a hard time finding the right tone, especially in their portrayal of Amy Poehler’s Leslie Knope, the department’s high-hopes heroine, as somewhat of a ditsy blonde. The sitcom righted itself by making her craftier in 2010 and Poehler, a co-producer of the show, would eventually win a Golden Globe for her performance.

“We hung on by the skin of our teeth for a good long while,” said Mike Schur, who created the show with “The Office” veteran Greg Daniels. “Ultimately, what really matters is finding a group of people that the show speaks to, who watch it all the time and are vocal about it. We were lucky enough to have that situation.”

Poehler said one of the biggest surprises is how many teenagers have become fans of the show. “Parks” is one of the cleanest network sitcoms of the past decade, rarely stooping to potty jokes or sexual innuendo.

“I can’t tell you how many people have 15- or 16-year-old kids that watch the show with them,” she said. “That family element to watching the show has been really nice. I do think these are characters that the viewers have really grown to love and care about.”

Even the show’s catchphrases are G-rated. One of the most notable: “Treat yo’self,” delivered regularly by actress Retta, as no-bull diva Donna Meagle.

“My friend Britney was visiting the set the day we first shot that and she’s like, ‘Omigod, that’s going to be huge,’ ” said Retta. “I was like, ‘Really?’ Now, if you search ‘treat yourself’ on Twitter and it’s been more than eight minutes that somebody has tweeted it, I’d be surprised. That’s how crazy it’s been.”

Risky business

Despite struggles to find an audience, Poehler and Schur have never stopped taking chances.

What other sitcom can say that its most emotional arc involved the death of a beloved mini-horse named Li’l Sebastian?

Its boldest choice may have been this season. The show jumped three years into the future, as Knope and loyal husband Ben Wyatt (Adam Scott) deal with everything from raising triplets to running for political office.

What remains the same in these final 13 episodes is an emotional, optimistic setting. Old characters have returned and a few new ones have made amusing cameos, including Bill Murray last week as the town’s late mayor, and Jon Hamm as an incompetent worker who was fired years ago but keeps showing up at the office.

Expect more celebrity appearances and big shockers in Tuesday’s one-hour finale.

“What Mike [Schur] has done with this ending is like nothing I’ve ever seen,” said Jim O’Heir, who plays Jerry, the hapless city employee who once fell into a pond trying to retrieve a burrito. In last week’s ultimate twist, Jerry became the town’s temporary mayor.

“When I read the final script, I had to keep quiet,” said O’Heir. “It’s not just funny. It’s sentimental and everything.”

Expectations may be high among loyal fans, but Schur said he can’t worry about disappointing them.

“I try not to care about finales that are thought of as great, or finales that are thought of as terrible,” he said. “ ‘The Sopranos’ ending to me is one of the greatest moments in the history of cinema or filmed entertainment, and a lot of people will tell you why it stinks.

“So it’s less of a question of trying to guess what an audience is going to like and more of a question of trying to honor the characters and show, to try to do something we think is good and let the chips fall where they may.”