The state’s highest court today upheld the first-degree murder convictions of two Boston men for a 2003 shooting on an Orange Line train that wounded a pregnant woman and claimed the life of her unborn son.

In a unanimous ruling, the Supreme Judicial Court ruled against Chimezie Akara and Andre Green, who contended their joint trial in Suffolk Superior Court in Boston was riddled with so many legal errors the only way to repair the damage would be to grant them new, separate trials.

But writing for the unanimous court, Justice Fernande R.V. Duffly said the evidence against the two men was substantial and any mistakes made by the judge, the prosecutor, or defense attorneys had only a limited negative impact on the defendants’ trial.

Advertisement - Continue Reading Below

“The evidence of each defendant’s guilt was strong,’’ she wrote at one point in the 34-page ruling. “We affirm the defendants’ convictions.’’

According to the SJC, Akara and Green wanted to shoot a rival, but when they opened fire inside the Orange Line car, they instead hit Hawa Barry in the abdomen.

She was rushed to a Boston hospital and saved by medical personnel. Her child, a boy, however, was pronounced dead 45 minutes after being born by Cesarean section.

In addition to the murder convictions, both men were also found guilty of three counts of armed assault with intent to murder, three counts of assault and battery with a dangerous weapon, and one count each of unlawful possession of a firearm and ammunition.

The SJC let all those convictions stand.

In a statement, Suffolk District Attorney Daniel F. Conley applauded the court’s ruling.

“These two men opened fire on a crowded subway train,’’ Conley said in he statement. “And who did they hit? A pregnant woman with no stake in their drama. Who did they kill? An infant who lived for less than an hour before succumbing to the injuries they inflicted. There can be no second chances for these two men. There can be no excuses for their behavior.”

Both men are serving sentences of life imprisonment without the possibility of parole.