Matthew Vaughn and Jane Goldman have been slowly, steadily building a reputation for themselves as a screenwriting team, and their collaborations so far include "Stardust," "Kick-Ass," and "X-Men First Class."

The film that is surprising when you look at their filmography is this Friday's new release "The Debt," adapted from an Israeli film call "Ha-Hov" that was written by Assaf Bernstein and Ido Rosenblum.  The script landed them on the Black List a few years ago, an informal annual collection of what some execs call the best unproduced scripts in a given year, and then went into production with John "Shakespeare In Love" Madden signed on as director.  The film played at last year's Toronto Film Festival, and then promptly dropped off the radar completely.  Now, after a quick distributor shift, Focus Features is putting the film out, and they benefit from the delay thanks to the fact that Jessica Chastain went from being an unknown quality to being one of the stars of a big summer hit and one of the most-discussed arthouse releases of the year.

"The Debt" tells a story divided between two eras.  First, we see some events in 1997 that culminate in a shocking suicide, and then we jump back to 1966, when those events were first set in motion.  Rachel Singer (Helen Mirren) and Stephan Gold (Tom Wilkinson) meet to discuss why David Peretz (Ciaran Hinds) stepped in front of a truck, but they both have a strong suspicion already.  The dark secret shared by the three of them began when they were sent into East Berlin in the '60s to help hunt down a Nazi war criminal, a mission that ended in a highly-publicized triumph.  The younger versions of their characters, played by Jessica Chastain, Marton Csokas, and Sam Worthington, were inspired to do what they did because of personal connections to the Holocaust and a desire to do something that helps rebalance the moral scales, and the film asks if you can do the wrong thing for the right reasons, and what cost there is to your soul if you make that choice.

For 2/3 of the running time, I think "The Debt" is a really smart, solid thriller, well-constructed, well-shot, and well-cast.  There is an interesting moral dilemma at the center of the film, and the script grapples with it in a meaningful way.  The problem is, there's a cheap action movie ending tacked onto the film that undermines almost all of the good work that comes before it, and it's such a mistake, such a dramatic shift in tone, that I walked out on the fence about giving the film a good review.  There's way more good than bad in this film, but there's something about a film where the ending doesn't work that frustrates me more than a film where there's a weak start but a strong finish.  This is sort of like watching an Olympic athlete run a perfect race and almost set a land speed record, only to make a mistake on the very last hurdle so bad that they perforate a testicle.  I've got sympathy pains from watching this film botch its conclusion.

It must be a terrifying challenge for a young actress just defining themselves onscreen to be asked to play a young Helen Mirren, but Chastain seems to me to be the real deal, someone who embraces a challenge, and since the film is really about Rachel, both of the actors have to play the same character.  We need to see the choices of one reflected in the actions of the other, and it works.  Chastain is very good, and there is a righteous fire in the way she plays the part.  These are young people, driven by anger and sorrow, and there are moments where Rachel makes some pretty unsympathetic choices.  Chastain makes sense of those moments, emotionally, and her performance is so strong that she creates a sense of gravity, with Csokas and Worthington caught in her orbit, reacting to her.  She drives the film, but Worthington is very good here, using his quiet smolder to suggest a young man already hollowed out by his desire for revenge.

Jesper Christensen plays the focus of their hunt, a gynecologist who they suspect of being one of the most twisted and savage butchers from the German death camps.  He puts a human face on the monster, and the best material in the film is between Christensen and Chastain when she poses as a young woman looking for help with fertility issues.  Allowing this man she believes is evil to have access to her most private places is a horrifying thought, and Madden builds those sequences very well.  In fact, Madden's work here in general is very strong.  He stages a few big set pieces with real aplomb, and I found myself impressed by much of the movie.

But then there's that ending.  I guess part of the problem is that they set up such a difficult situation that it's hard to figure out a satisfying conclusion, morally or dramatically.  The problem is that they undercut a number of very smart choices by having these characters suddenly do very dumb things, and it all turns into a sort of pedestrian face-to-face fistfight between two characters instead of an intellectual or emotional confrontation.  It's the easy way out, a nod to a popcorn movie audience that isn't going to see this movie anyway.  It's a shame.

Still, there is much about the film to enjoy, and there is some very strong performance work on display.  For adult audiences feeling ill-treated by most of the summer movies, "The Debt" is a nice start to the fall, flawed but full-bodied, and close enough to very good for me to recommend it.

"The Debt" opens this weekend.