Massachusetts Governor Charlie Baker has defended the two-and-a-half year delay in clearing Irish nanny Aisling Brady McCarthy of all charges in the death of one-year-old Rehma Sabir in 2013.

The governor has faced criticism over the state's handling of the case.

“My view is, it’s better they change their position if they believe the original position was wrong than simply stick with their old diagnostic,” he told the Boston Herald.

Baker said the medical examiner’s office had “to get the answer right.”

He added that the case predated “everybody in our administration.”

McCarthy, who spent the two-and-a-half years in prison, said what prosecutors did to her “was scandalous.”

“My worst nightmare is finally over,” she said.

McCarthy arrived home in Ireland at Shannon Airport on Wednesday morning, the Daily Mail reports.

“The police and (Dr.) Alice Newton, they just decided right away that I had killed the child. That couldn't be further from the truth. I loved her and cared for her, ten hours a day, five days a week,” said McCarthy.

McCarthy’s defense attorney originally paid a $5,000 bond to the court so the Irish nanny could be free while she put together her defense. However, when Middlesex prosecutors told the judge McCarthy's visa had lapsed and she had been living illegally in the US for 13 years, U.S. Immigration and Customs Enforcement considered her a flight risk, and bail jumped to $500,000.

As she was unable to afford the bond she had to spend two years behind bars. She remained in jail until May, when she was freed on a $15,000 cash bail by superior court judge Maureen Hogan.

Last week, Middlesex District Attorney Marian Ryan announced that the murder charge was being dropped because the medical examiner issued an amended ruling changing the manner of death from “homicide” to “undetermined.”

The district attorney said the medical examiner found Rehma had prior medical issues and may have had some type of undiagnosed disorder.

McCarthy’s lawyer, Melinda Thompson said: “Ms McCarthy was put in jail for two-and-a-half years over a crime that never occurred. Not just a crime that she did not commit, but a crime that did not occur.”

Read more: Innocent Irish nanny deported, arrives home to Shannon Airport (VIDEO)