A lawyer who took heat for turning down an $8 million settlement in a medical-malpractice suit — only to lose at trial — became a hero when he scored a $130 million judgment for a brain-damaged Suffolk County girl at a new trial this week.

In a courtroom drama reminiscent of the Paul Newman film “The Verdict,” lawyer Thomas Moore persuaded a Long Island jury that St. Charles Hospital in Port Jefferson was responsible for mistakes made during delivery that left now-10-year-old Shannon Reilly with cerebral palsy.

Moore had convinced the girl’s family in 2009 to reject the multimillion- dollar settlement offer from the hospital, which they accused of failing to notice that the girl was deprived of oxygen at birth. He then lost the case at trial and the family got nothing.

At the time, the legal failure was mocked in the press by a hospital lawyer.

“I’m not aware of another attorney who’s turned down an $8 million offer and got shut out,” Peter Kopff told The Post that year.

But like Newman’s character in the 1982 Oscar-nominated film, Moore persisted. A state appellate court unanimously reversed the first verdict in 2011. The case went to another trial last year, which resulted in a hung jury.

A third trial started last month — and the years of struggle finally paid off.

On Monday, the jury handed down the nine-figure verdict, which was signed by a Suffolk County judge yesterday.

“This case was a living nightmare for four years, but the family never gave up and I never gave up,” Moore said.

Shannon cannot walk or speak and needs round-the-clock medical care.

“The saddest part of this case is that despite the litany of errors, this baby could have been rescued. Had the nursing team communicated with the obstetrician just 15 minutes sooner — and delivered the baby — this terrible tragedy could have been avoided,” Moore said.

Shannon’s parents could not be reached, but her mother, Danni, told Moore she was thrilled.

“She said, ‘The agony of the last 10 years is finally ended with the knowledge that our beloved daughter will be protected for the rest of her life,’ ” Moore recounted.

Moore said he felt vindicated by the verdict after taking heat for turning down the $8 million.

“I’m humbled, in all honesty . . . I believe justice has been done,” said Moore, who marveled at how the case played out like the Newman film, in which a hard-drinking Boston attorney also refuses a big settlement while pursuing a medical-malpractice case.

“This was a replay,” a jubilant Moore said. “I’m not an alcoholic, but people have told me in my better moments that I look like Paul Newman.”

Kopff predicts the judge will reduce the award and blasted Moore’s courtroom antics.

“We have some issues with how Moore conducted the trial. We have certain rules of professional conduct and they were violated,” he said, claiming that Moore called one of his expert witnesses a liar in court.