The Even Chance

The film begins in January 1793 as a 17-year-old Hornblower joins a ship of the line, Justinian. Hornblower is introduced to his shipmates, one of whom is the ruthless Jack Simpson, who rules the midshipman's berth as the bully he is.
Hornblower becomes suicidal under Simpson's malignant rule and finally finds opportunity to challenge him to a duel. An older midshipman, Clayton, feels guilty that he himself has not stood against Simpson. He knocks Hornblower unconscious, takes his place in the duel and is killed. Simpson, on the other hand, recovers to fight another day.
Hornblower goes on to join the frigate, Indefatigable, under the command of Captain Pellew. Midshipmen Kennedy, Hether, and Cleveland go with him, as well as Simpson's old division which, due to Pellew's ire, becomes Hornblower's division. Hornblower's conduct under the pressure of battle eventually wins the respect and loyalty of these men.
Simpson joins Indefatigable (known by her crew as the Indy) when Justinian is sunk by a rogue French ship called Papillon. The Indy and her crew take on a cutting out expedition into the Gironde, take Papillon, and sail to rejoin Indefatigable. During the operation, Simpson attempts the murder of Hornblower, and sets Kennedy adrift.
The French Ship, Papillon, now in the hands of the British, is sailing back to the Indy when the Indy comes under fire from three French ships. On the way back to the Indy, the Papillon comes under fire from shore batteries, killing the two officers superior to Hornblower, Lt. Eccleston and Lt. Chadd. Shortly before the most senior officer (Eccleston) dies, he tells Hornblower to take command. Simpson attempts to challenge Hornblower's authority, but Hornblower tells Mr Bowles (the ship's master), that if Mr Simpson resists "you have my permission to shoot him". Simpson is then taken below whilst the Papillon sails back to the Indy.
The Indy is now taking heavy fire from the three French ships, and Hornblower orders the Papillon not to lower her French colours. The Papillon then engages the French ships forcing them to surrender. After the battle, Mr Simpson and Hornblower are called to Captain Pellew's cabin. Accused by Hornblower of attempted murder, Simpson challenges him to a second duel, which Hornblower accepts (after receiving permission from Pellew).
In this second duel, which takes place on a beach, Simpson shoots at Hornblower before the combatants are actually told to fire. Simpson claims, dubiously, that it was a misfire, running forward to see if his opponent is still alive. But Hornblower is not badly injured. Simpson is then told that he must stand his ground and take fire. Faced with this prospect, Simpson pleads pathetically to Hornblower for his life, revealing himself for the coward he is. Hornblower fires into the air, claiming that shooting the now defenseless Simpson is "not worth the powder". Smarting at this insult, Simpson attempts to knife Hornblower, but is shot dead just before he reaches him by Captain Pellew, who is standing concealed on a cliff above the beach.
As the film draws to its end, Captain Pellew tells Hornblower precisely how impressed he has been by his actions. Pellew anticipates that Hornblower has a great career ahead of him, if he continues as he has begun.

Question: Who shoots and kills Simpson?
Answer: Captain Pellew