In its first detailed tally of the impact of the drug lab controversy, the state’s judiciary said it needs $8.72 million to deal with legal challenges to as many as 136,000 criminal cases in which evidence was allegedly mishandled by a state drug lab chemist.

In a letter sent to the Patrick administration Wednesday, Judge Robert Mulligan, the top judge for administration, and Court Administrator Harry Spence said the funds would pay for 18 months of litigation related to chemist Annie Dookhan’s actions over nine years working for the Massachusetts Department of Public Health.

The request pushes to more than $35 million the total cost sought so far for the state to deal with the fallout of the Dookhan scandal.

Advertisement - Continue Reading Below

“The influx of drug lab cases will be extremely detrimental to meeting our clearance rate goals and disposing of cases within their time frame metrics,” Mulligan said in a statement released to the Globe Thursday.

The judiciary has already set up drug lab sessions in courthouses across the state. In its letter, the judiciary said it will need to hire retired judges to assist with the caseload, which could total 5,000 in superior court alone during the next 18 months.

In its letter, the judiciary also said it would use the money to hire 27 people in superior court, including three retired judges who would hear cases for $220 a day, and to hire 48 assistant clerk magistrates, case specialists, and law clerks for the district and Boston Municipal Court.

The plan also calls for hiring 18 probation officers and 14 associate probation officers.

Mayor Thomas M. Menino has already asked for $15 million to deal with the aftermath of the scandal, including the release of drug dealers back into the Boston community.

Requests from the state’s district attorneys are expected to exceed $10 million, and a request for millions more is expected to come from the Committee on Public Counsel Services, which is providing defense attorneys for thousands of defendants affected by the drug lab scandal.

Attorney General Martha Coakley is also seeking up to $2 million for a sweeping inquiry into the lab’s operations.

Terrel Harris, a spokesman for the Executive Office of Public Safety, said the administration would not publicly reveal funding requests made by its constituent agencies, which include the State Police, the Department of Correction, and the Parole Board.

He said the dollar amount sought by public safety agencies would be made public by the state’s Executive Office of Administration and Finance.

Dookhan is accused of mishandling and manipulating drug evidence that may have helped convict hundreds of people or led them to plead guilty, during a Department of Public Health career that began in 2003 and ended earlier this year, after she resigned.

The Patrick administration and Coakley initially contended that Dookhan’s impact was limited to about 100 Norfolk County cases.

But State Police assigned to Coakley’s office discovered a far greater problem this summer and have alerted prosecutors that at least 34,000 criminal cases, involving 60,000 drug samples, may have been tainted.

The court’s estimate of 136,000 cases is based on the total number of drug cases the courts handled in which evidence was sent to the closed Jamaica Plain lab.

Dookhan has pleaded not guilty to two counts of obstruction of justice and one count of falsifying her academic record. Dookhan, 34, the mother of a young son, is free on $10,000 cash bail.

Former homicide prosecutor David Meier has identified some 1,600 people serving sentences in state or county prison where Dookhan may have handled the seized contraband. He also said another 319 juveniles who were prosecuted for drug crimes had the evidence in their cases processed in the Jamaica Plain lab.

All of the juveniles have finished their DYS commitments and are no longer in custody.

In September, the Patrick administration set Oct. 24 as the deadline for government agencies to file a supplemental budget request related to the drug lab scandal. In a statement Wednesday, Secretary of Administration and Finance Jay Gonzalez said some state agencies and municipal governments have met the deadline.

But Gonzalez, through a spokeswoman, refused to release individual requests that have been received by the deadline.

Alex Zaroulis said Thursday that the administration will not release what the agencies have asked for until the data has been reviewed. She said the administration’s supplemental budget request, to be filed next week, will be publicly available.

In the statement released Wednesday, Gonzalez said he will file a “a supplemental appropriations bill for the sole purpose of seeking interim funding sufficient to cover costs related to the crime lab for at least the next few months.’’

Gonzalez would decide who gets the money once he gets “documented costs associated with the crime lab.’’

He also said the agency will work with affected agencies to “ensure that any future funding needs are addressed in an effective and responsible manner.’’