A judge ruled Monday that a 14-year-old boy who is accused of setting one of several fires in downtown Lewiston last year is competent to stand trial.

Judge Rick Lawrence’s order in Lewiston District Court lifted an earlier ruling that found the boy, Abdi Ibrahim, was temporarily unfit to stand trial, clearing the way for the case against the boy to proceed.

Ibrahim, who was 12 at the time, is accused of starting a fire on May 3, 2013, in a garage between Bartlett and Pierce streets. The fire destroyed the apartment buildings at 149 Bartlett St., 110 Pierce St., 114 Pierce St. and 116 Pierce St.

Ibrahim entered a plea of “deny,” the juvenile equivalent of a not guilty plea, to four counts of arson shortly after his arrest in May 2013.

Ibrahim was one of two boys charged with setting two unrelated fires in downtown Lewiston over several days last year. Just days after those two fires, two adult men set a third fire in Lewiston’s downtown.

Questions of mental health and competency have weighed heavily on authorities as they struggled to hold people accountable for the fires in Lewiston’s densely populated downtown between April 29 and May 6, 2013.

The fires, which left city residents terrified, destroyed nine buildings, scorched others and left nearly 200 people homeless, most of whom were living in poverty and some of whom came to this country as refugees from war-torn African nations. It took government agencies, volunteers and social workers more than two months to find homes for all of them.

In making his ruling, Lawrence issued two orders: One is sealed from the public, and the other contains only the basic facts of his decision and the history of the case.

“The suspension of the proceedings in this matter is ended,” Lawrence said in the two-page public ruling, which is dated Aug. 7 but was released Monday.

The court had previously ordered, on Jan. 9, that Ibrahim was “not then competent to proceed, but concluded that there was a substantial probability” that he could be found competent in the future.

Ibrahim’s attorney, Jeffrey Dolley, and the prosecutor, Assistant District Attorney Melanie Portas, argued in a closed juvenile hearing in Lewiston District Court on Aug. 4 about whether to lift that January order. A psychologist from the State Forensic Service and a clinician from the juvenile facility where Ibrahim is now living testified at the hearing, Lawrence wrote in his public order.

Dolley said he was pleased that the judge held the competency hearing, although he had argued that Ibrahim should be found not competent.

“I really felt that there were some substantial issues regarding his competency,” Dolley said.

Although juvenile proceedings are often closed to the public, state law requires that Ibrahim’s case be public because of the seriousness of the charges against him. The competency hearing was closed because of a special order by the judge.

Ibrahim, of Lewiston, is one of four people to be charged with setting the fires last year. But since then, the cases against two of the four defendants unraveled, and until Monday’s ruling, it was uncertain whether the Androscoggin County District Attorney’s Office would be able to prosecute Ibrahim’s case.

The judge’s order came just days after one of the adults, 31-year-old Brian Morin, became the first person to be sentenced to prison in connection with the fires. Morin pleaded guilty on June 6 and was sentenced last Wednesday to five years in prison, followed by 12 years of probation.

Morin and a co-defendant – Bryan Wood, 24, of Lewiston – were charged with setting a fire on May 6, 2013, that destroyed vacant apartment buildings at 114 and 118 Bartlett St. and damaged 91 Horton St. because they didn’t like that the buildings were vacant and neglected.

Authorities had also charged another 12-year-old boy with starting the first fire on April 29.

The case against Wood was dismissed when a judge in August found him not competent to stand trial, based in part on a state psychologist’s examination that showed Wood has “mild retardation.”

The state was forced to dismiss its case against Brody Covey, who was 12 when he was accused of setting the first fire, because of a mistake by Lewiston police.

Covey told police in an interview that he started a fire on April 29, 2013, behind the condemned building at 105-111 Blake St., where he and his parents faced eviction. That fire created such fierce flames that it spread and destroyed adjacent buildings at 172 Bates St. and 82 Pine St.

A judge ruled that Covey’s confession could not be used in court because police had failed to inform him until nearly two hours into their interrogation that he had the right not to talk and to have a lawyer present.