An Irish-born lawyer who faced scorn for turning down an $8 million settlement in a medical-malpractice suit — only to lose at trial — has became the hero who secured a massive $130 million judgment for a brain-damaged Suffolk County girl at a new trial this week.

According to the New York Post, lawyer Thomas Moore, a Waterford native, convinced a Long Island jury that the Saint Charles Hospital in Port Jefferson was responsible for a series of mistakes made during the child delivery that left the now 10-year-old Shannon Reilly with cerebral palsy.

Moore faced widespread criticism when he convinced the girl’s family to reject a multimillion dollar settlement offer from the hospital in 2009. The Reilly family had accused the hospital of failing to notice that the girl was deprived of oxygen at birth. But Moore lost the case at trial and the family got nothing. The outcome 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 Moore persisted, undaunted by the setback. Then a state appellate court unanimously reversed the first verdict in 2011, allowing the case to go to another trial last year, which resulted in a hung jury.

Then third trial started last month, and the years of struggle and anxiety finally paid off. On Monday the jury reportedly handed down the nine-figure verdict.

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

The inspiration behind their never-say-die efforts was the child herself, because 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 mother Danni told Moore she was thrilled. '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 quoted her as saying.

Moore reflected on all the previous criticism and said he felt vindicated by the verdict after turning down the $8 million.

'I’m humbled, in all honesty… I believe justice has been done,' said Moore.