Few film genres are more devoted to their clichés than the cop flick. You have your renegade, loose-cannon cops who butt heads with their stuffy, by-the-book lieutenants, who threaten to take away their badges if they screw up again. Then their unorthodox style ends up saving the day, and the blustery commanding officer is forced to eat crow.

“S.W.A.T.” does little to reinvent the cop movie — its characters emit throaty utterances like “Gamble’s a good cop!” and “You sold me out!” just the way its forebears did — but it works within the conventions of the genre to deliver solid, reliable entertainment. Its prime directive is fun, and it never loses sight of that.

The film’s structure is similar to that of the superhero movies we’ve seen so many of lately. Lt. Dan “Hondo” Harrelson (Samuel L. Jackson), once the pride and joy of the LAPD’s Special Weapons and Tactics squad, is brought back on board to assemble a new team that can improve the LAPD’s tarnished public image. He hand-picks the best S.W.A.T. and potential S.W.A.T. officers, trains them, coaches them, and gives them sage words of counsel. At the film’s half-way point — when the heroes’ powers have been fully developed through a series of lesser crises — a villain emerges who poses their first major threat.

The villain is an international fugitive (Olivier Martinez) who publicly declares he will pay $100 million to whoever frees him while he’s being transported to federal custody. In L.A., there are a lot of criminals who would do anything for $100 million, especially if it means they get to kill some cops in the process. Havoc, needless to say, is wreaked.

The S.W.A.T. team itself is a likable brotherhood of butt-kicking, a group of men (and one woman) who walk and even speak with a swagger. Their personalities are not awfully distinct, but, led by Colin Farrell as a man trying to prove himself after being removed from S.W.A.T. six months earlier, and Michelle Rodriguez as a tough-girl single mom, they make a team the audience can root for. Inter-squad conflicts are kept to a minimum, and romance between Rodriguez and anyone else is eschewed. They need to work as a team, and they do they admirably.

The irony is that while the film is based on a 1975 TV series best remembered now for its ultra-violent content, the film is more discreet. It is filled with violence, but only because the story requires it. It never seems wanton; there is little of the “we thought it would be cool to blow something up, so here’s something blowing up” attitude prevalent in many summer films. Hondo tells his crew that S.W.A.T. is interested in life-saving, not life-taking, and the film backs him up on that. More noteworthy than the characters who die are the ones you expect to die who don’t.

The director, Clark Johnson, has worked on cop shows like “NYPD Blue,” “The Shield” and “The Wire,” and he is clearly comfortable with the gritty reality of such an endeavor. The film becomes nearly indistinguishable from countless other cop films in its last act, when the S.W.A.T. members stop using special weapons and tactics and start using regular ones, but maybe you can only do so much within the confines of a genre. “S.W.A.T.” does a lot, and has fun doing it.

B (1 hr., 57 min.; PG-13, a lot of mid-level profanity, a lot of cop-related violence and shooting.)