Bradley Cooper in American Sniper.

Chris Kyle was a legendary Navy SEAL, and Bradley Cooper’s portrayal of him in Clint Eastwood’s American Sniper is powerful and compelling. While the film has plenty of problems, Cooper rises above patchy melodrama and overly slick segments to make the film worthwhile.

Kyle was killed while the film was being produced, shot to death by a veteran he was trying to mentor on a shooting range. Kyle did four tours in Iraq, with 160 confirmed kills—an American sniper record. His story is extraordinary, not just because of what he did overseas, but because of the way he eventually met his death.

The film works best when depicting Kyle at work in Iraq, featuring some tense battle scenes and sequences as seen through Kyle’s riflescope. On the flip side, there’s a subplot involving an enemy sniper named Mustafa (Sammy Sheik) that feels like an entirely different movie. Eastwood employs a showier style in the scenes involving Mustafa, which feel a bit false and artificial.

Eastwood does a decent job of showing what soldiers like Kyle were up against in Iraq. Soldiers would sit down for what seemed to be a friendly dinner, only to discover a cache of weapons in another room. Women gave their children bombs to lob at Americans. Enemy torture artists took drills to the heads of children because their parents spoke with American soldiers.

The film is also powerful while dealing with Kyle’s stress when he returned home from the war. One of the film’s best scenes involves Kyle running into a former soldier while at an auto shop. It’s in these moments that Cooper does a fantastic job of depicting a man with a lot of bad memories that are clamoring for attention in his head.

Saddled with the film’s worst dialogue, Sienna Miller battles to make Kyle’s wife, Taya, an intriguing character; unfortunately, she can’t overcome screenwriter Jason Hall’s leaden lines. There are scenes in this movie involving Taya that you will swear you have seen before, because there is nothing original about them. Still, Miller is a strong actress, and she salvages as much as she can.

Eastwood’s film completely avoids some of the more controversial aspects of Kyle’s postwar life, such as his strange feud with former Minnesota Gov. Jesse Ventura, and his alleged killing of two carjackers near Dallas. That was probably a good choice, since the film already feels a bit overstuffed at two-plus hours. It would have been interesting to see Kyle punch Ventura in the face (as Kyle claimed he did in his book), but it wouldn’t have fit in this movie. That would’ve been too much of a tonal shift.

Cooper underwent an impressive physical transformation to play Kyle. He shows that the transformation wasn’t simply cosmetic when he deadlifts what seems to be the weight of a small city during a training session.

Eastwood includes some footage of Kyle’s actual funeral procession and a memorial event held for Kyle. He shies away from depicting Kyle’s death, but we do get a brief glimpse of an actor portraying his assailant. It’s such a strange ending to Kyle’s story.

Eastwood did two movies in 2014, and American Sniper is far superior to his lousy Jersey Boys. Still, there are times when Eastwood doesn’t seem to have full command of the frame, and he’s working with a spotty script.

You will walk away from American Sniper amazed by the impact of Cooper’s dedicated performance. Cooper, currently starring on Broadway in The Elephant Man, is an actor forever taking risks and challenging himself. He does “The Legend” proud.

American Sniper is playing at theaters across the valley.