On the Waterfront

Mob-connected union boss Johnny Friendly (Lee J. Cobb) gloats about his iron-fisted control of the waterfront. The police and the Waterfront Crime Commission know that Friendly is behind a number of murders, but witnesses play "D and D" ("deaf and dumb"), accepting their subservient position rather than risking the danger and shame of informing.
Terry Malloy (Marlon Brando) is a dockworker whose brother Charley "The Gent" (Rod Steiger) is Friendly's right-hand man. Some years earlier, Terry had been a promising boxer, until Friendly had Charley instruct him to deliberately lose a fight that he could have won, so that Friendly could win money betting against him. Terry is used to coax Joey Doyle (Ben Wagner), a popular dockworker, into an ambush, preventing Joey from testifying against Friendly before the Crime Commission. Terry assumed that Friendly's enforcers were only going to "lean" on Joey to pressure him into silence, and is surprised when Joey is killed.
Joey's sister Edie (Eva Marie Saint), angry about her brother's death, shames "waterfront priest" Father Barry (Karl Malden) into fomenting action against the mob-controlled union. Friendly sends Terry to attend and inform on a dockworkers' meeting Father Barry holds in the church, which is broken up by Friendly's men. Terry helps Edie escape the violence, and is smitten with her. Another dockworker, Timothy J. "Kayo" Dugan (Pat Henning), who agrees to testify after Father Barry promises unwavering support, ends up dead after Friendly arranges for him to be crushed by a load of whiskey in a staged accident.
Although Terry resents being used as a tool in Joey's death, and despite Father Barry's impassioned "sermon on the docks" reminding the longshoremen that Christ walks among them and that every murder is a Calvary, Terry is at first willing to remain "D and D", even when subpoenaed to testify. However, when Edie, unaware of Terry's role in her brother's death, begins to return Terry's feelings, Terry is tormented by his awakening conscience and confesses the circumstances of Joey's death to Father Barry and Edie. Horrified, Edie breaks up with him.
As Terry increasingly leans toward testifying, Friendly decides that Terry must be killed unless Charley can coerce him into keeping quiet. Charley tries bribing Terry with a good job and finally threatens Terry by holding a gun against him, but recognizes that he has failed to sway Terry, who blames his own downward spiral on his well-off brother. In what has become an iconic scene, Terry reminds Charley that had it not been for the fixed fight, Terry's prizefighting career would have bloomed. "I coulda' been a contender," laments Terry to his brother, "Instead of a bum, which is what I am â let's face it." Charley gives Terry the gun and advises him to run. Terry flees to Edie's apartment, where she first refuses to let him in but finally admits her love for him. Friendly, having had Charley watched, has Charley murdered and his body hanged in an alley as bait to lure Terry out to his death, but Terry and Edie both escape the attempt on Terry's life.
After finding Charley's body, Terry sets out to shoot Friendly, but Father Barry prevents it by blocking Terry's line of fire and convincing Terry to instead fight Friendly by testifying. Terry proceeds to give damaging testimony implicating Friendly in Joey's murder and other illegal activities, causing Friendly's mob boss to cut him off and Friendly to face indictment.
After the testimony, Friendly announces that Terry will not find employment anywhere on the waterfront. Terry is shunned by his former friends and by a neighborhood boy who had previously looked up to him. Refusing Edie's suggestion that they move away from the waterfront together, Terry shows up during recruitment at the docks. When he is the only man not hired, Terry openly confronts Friendly, calling him out and proclaiming that he is proud of what he did. The confrontation develops into a vicious brawl, with Terry getting the upper hand until Friendly's thugs gang up on Terry and nearly beat him to death. The dockworkers, who witness the confrontation, show their support for Terry by refusing to work unless Terry is working too and pushing Friendly into the river. Encouraged by Father Barry and Edie, the badly injured Terry forces himself to his feet and enters the dock, followed by the other workers. A soaking wet and face-scarred Friendly, now left with nothing, swears revenge on them all, but his threats fall on deaf ears as they enter the garage and the door closes behind them.

Question: Who prevents it by blocking Terry's line of fire?
Answer: Father Barry; Father Barry