Double Jeopardy

Nick Parsons (Bruce Greenwood) and his wife Elizabeth (Ashley Judd), known as Libby, are wealthy residents of Whidbey Island, Washington. He buys her a yacht and they set off sailing for the weekend. After a session of love making, Libby falls asleep. She wakes to find her husband missing and blood all over her hands, clothes, legs, and the boat's floors. A Coast Guard vessel appears and Libby is spotted holding a bloody knife she found lying on the deck. She is arrested, humiliated in the media, tried, and convicted of her husband's murder.
Libby asks her best friend, Angela Green (Annabeth Gish), to look after her 4-year-old son, Matty (Benjamin Weir), for the duration of her prison sentence. On a phone call with Matty from prison, Libby hears a door open in the background, then Matty exclaims, "Daddy!" right before the line goes dead.
Libby realizes that Nick possibly faked his death and framed her, leaving their son as the sole beneficiary of his life insurance policy, as people convicted for murder are not allowed to collect the life insurance on their victims. After attempting (unsuccessfully) to get investigative help, she is told by a fellow inmate named Margaret (Roma Maffia) that if she were to get paroled for good behavior, she could kill Nick with impunity due to the Double Jeopardy Clause in the Fifth Amendment of the U.S. Constitution.
Libby is paroled after six years and begins searching for Nick and Matty, while living in a halfway house under the supervision of parole officer Travis Lehman (Tommy Lee Jones). Libby violates her curfew and is caught breaking into Matty's school on Whidbey Island to try to get Angela's records, but manages to escape from Lehman and continue her search.
After discovering Angela has recently died in Colorado, Libby recognizes a Kandinsky painting in a newspaper photo. Tracing it through a dealer's database (which nearly again allows her capture by Lehman) leads her to New Orleans, where she finds Nick living a luxurious lifestyle under an assumed name, Jonathan Devereaux.
Libby confronts him after making a winning bid of $10,000 on him at a bachelor's auction. She demands he return Matty in exchange for her silence about his real identity. Nick agrees to bring Matty to a meeting in a cemetery. There he uses a decoy boy to distract Libby, knocks her unconscious, and locks her in a casket inside a mausoleum. Using a .38 caliber handgun she had snatched from Lehman, Libby manages to shoot the hinges off the lid of the casket and escape the mausoleum by throwing a flower vase through a stained glass window.
While tracking Libby in New Orleans, Lehman himself becomes suspicious of Nick's death and begins to believe Libby's story, based on the clues uncovered in his search. He finds a picture of a different Nicholas Parsons when searching the Washington State DMV records to prove his suspicions, and later confirms them when he uncovers six DMV records under that name, including Nick's DMV application and photograph. After seemingly capturing Libby later in the city, the two actually team up. Lehman visits Nick in his office under the pretense of asking for money to keep his identity secret. He records a remark by Nick that he had murdered his wife, the only witness to his true past. Libby enters, holding Nick at gunpoint. Nick is given a choice of surrendering to the authorities or getting shot by his vengeful wife, whom he believes would go free for this deed because of double jeopardy.
Nick responds with violence. In the ensuing melee, Nick pulls out a hidden gun, shoots Lehman, and fires away at Libby. Lehman manages to bring Nick down before he can shoot Libby. Nick gets the upper hand, but before he can kill the wounded parole officer, Libby shoots Nick dead.
Lehman promises to help Libby get fully pardoned. Together, they travel to Matty's boarding school in Georgia, where he is playing soccer. Matty (Spencer Treat Clark), now eleven years old, recognizes his mother and they embrace with Travis watching them.

Question: Who shoots Lehman?
Answer: Nick.