BINGHAMTON, N.Y. (AP) — Two Bosnian men accused in the near-fatal beating of a Binghamton University student will be released from jail next week but will have to wear electronic monitors, a judge ruled Friday.

Sanel Softic, 21, and Edin Dzubur, 24, were being held without bail for their role in the attack on 22-year-old Bryan Steinhauer, who was left in a coma by the beating four months ago.

U.S. authorities were wary of releasing the two men after a third co-defendant, former BU men’s basketball player Miladin Kovacevic, fled to his native Serbia, touching off a diplomatic crisis between the two countries.

Broome County Judge Martin Smith said he would release Softic and Dzubur on Wednesday on $10,000 bail they previously posted. Smith ordered the two men to be tracked by electronic monitoring. They also surrendered their passports.

The pair were charged with first-degree assault and gang assault.

Both are Bosnians, but have lived in the Binghamton area since the 1990s and have family here, their lawyers told Smith. Their lawyers have said neither man took part in the attack on Steinhauer.

Binghamton detectives said Kovacevic, 21, along with Softic and Dzubur, viciously beat Steinhauer on May 4 at the Rathskeller Pub, a downtown Binghamton bar.

According to statements given by the defendants, the 130-pound Steinhauer, an honor student, started the fight by groping Softic’s girlfriend on the dance floor and then head-butting Softic and taking a swing at the 6-foot-9, 260-pound Kovacevic when they confronted him.

Steinhauer continues to recover in a hospital in Long Island, near his home.

After several weeks in jail, Kovacevic was released June 6 when his parents posted $100,000 bail through the Serbian consulate. As a condition of his release, Kovacevic surrendered his passport.

But on June 9, Kovacevic left the country using an emergency passport issued to him by the consulate office. The Serbian consulate dismissed the two diplomats who aided Kovacevic’s flight from the United States. But Serbia has refused to turn over Kovacevic, saying its laws do not allow the extradition of its citizens to the United States.

Kovacevic’s lawyer, Veselin Cerovic, said his client fled because he doesn’t trust the U.S. justice system and will not return to America to face trial.

U.S. Sen. Charles Schumer of New York and U.S. Secretary of State Condoleezza Rice have demanded Kovacevic’s return and threatened to cut back aid to Serbia over the episode.

Bosnian law also blocks extradition of its citizens to other countries.

Both Softic and Dzubur were released in late May after posting $10,000 cash bail and remained in the area. But their bail was revoked after Kovacevic’s flight and after a grand jury indicted all three on more serious first-degree assault and gang assault charges.