There’s a scene near the end of the comedy “Fist Fight” — not long before the altercation promised in the title — that more than makes up for whatever weak-sauce comedic sins have gone before. Let’s just say that the combo of Big Sean’s unprintable hit rap, star Charlie Day’s nebbishy physicality and a young girl’s school talent show is comedy gold.

If the rest of the film were as uproarious, “Fist Fight” would rank up there with the “Jump Street” reboots in the “funny movies featuring Ice Cube” category. As it stands, “Fist Fight” is a pleasantly foul-mouthed exercise that gets by on the chemistry of its two stars: Cube, with his NWA-trained death glare, and Day, who basically recycles his likably hapless yet inventive character from “It’s Always Sunny in Philadelphia” into a more responsible suburban dad.

Nice-guy Campbell (Day) and mean-guy Strickland (Ice Cube) are both teachers at a failing high school in the throes of staff layoffs. (Just to show how failing this school is, Tracy Morgan is the coach.) Campbell feels he needs his job more than most since he has a pregnant wife (JoAnna Garcia Swisher) and a young daughter (Alexa Nisenson) at home. So when stern Strickland explodes at a disruptive student, demolishing his desk with an ax, it doesn’t take much for Campbell — despite threats from Strickland — to tell the principal in the hopes of saving his job.

Then it’s on. Big, beefy Strickland challenges small, marshmallow-man Campbell to a fight at 3 p.m. after school — and the entire school (and the Internet, #teacherfight), erupts in anticipation.

Director Richie Keen, best-known for episodic TV comedies including “It’s Always Sunny in Philadelphia” and working from a story co-written by TV comic actor Max Greenfield, does his best to turn “Fist Fight” into a teachable moment. There’s a can’t-we-all-just-get-along message embedded as well one respecting the work teachers do in the face of often indifferent students and bureaucracy.

But that’s not what anyone interested in this movie is coming for. Neither are they coming for the strong supporting cast (in addition to Morgan, there are Dennis Haysbert, Kumail Nanjiani from “Silicon Valley,” Christina Hendricks from “Mad Men” and Jillian Bell from “Workaholics”).

They want angry Ice Cube and nerdy Charlie Day facing off. And, in that, they won’t be disappointed.

MOVIE REVIEW

“Fist Fight”

Grade: C+

Starring Ice Cube, Charlie Day and Tracy Morgan. Directed by Richie Keen.

Rated R for strong language throughout, sexual content/nudity and drug material. Check listings for theaters. 1 hour, 31 minutes.

Bottom line: Foul-mouthed exercise that just leads to a big fight