Updated

An Arizona judge on Wednesday sentenced a man to 57 months in prison for his part in the gun-smuggling ring that is connected to the death of a U.S. Border Patrol agent and was the target of the Justice Department’s failed Operation Fast and Furious.

Jaime Avila Jr. pleaded guilty in federal court to conspiracy and dealing guns without a federal license.

The 25-year-old Avila bought two rifles found at the scene of the fatal shooting of Agent Brian Terry north of the Arizona-Mexico border. He also must undergo treatment for drug and alcohol abuse while in prison, as part of the sentencing.

U.S. District Judge James Teilborg said Avila has shown remorse, but could have spared the lives of Terry and others. Teilborg was also scheduled Wednesday to sentence five other men who admitted serving as straw buyers for the ring.

Avila faced up to 10 years in prison for his admitted role as a straw buyer for the ring that authorities say bought and smuggled guns into Mexico for the Sinaloa drug cartel.

Judge Teilborg said the weapons Avila purchased were clearly weapons of war to be used to kill people. He also said Avila’s sentencing will send a message to others that there are consequences for this type of crime.

Avila bought two AK-47-style weapons at a suburban Phoenix gun store that were found in the aftermath of the Dec. 14, 2010, shootout near the Arizona border city of Nogales in which Terry was killed.

The firefight was between border agents and five men who had sneaked into the country from Mexico for the purpose of robbing marijuana smugglers.

Operation Fast and Furious started in 2009 and was run by an Arizona field office of the Bureau of Alcohol, Tobacco, Firearms and Explosives.

The agency allowed roughly 1,400 guns to enter the black market in hopes the sales would lead them to cartel organizers. However, many of the guns turned up at crime scenes across Mexico and the United States and most were not recovered.

Mexico's drug cartels often seek out guns in the United States because gun laws in Mexico are more restrictive than in the United States.

So far, 15 of the 20 people charged in the gun case pleaded guilty to charges. Most of those who admitted guilt are straw buyers who said they falsely claimed that guns they bought were for them, when they were actually purchased for the ring. One of the ring's organizers also has pleaded guilty.

Records show a Jan. 3 trial has been set for five other alleged ring members, including a man accused of being a ring leader, two alleged recruiters and a straw buyer who is accused of illegally buying 245 guns.

Authorities brought a separate case in federal court in Tucson against five men charged with murder in Terry's death.

So far, one man has pleaded guilty to first-degree murder. The plea allowed Manuel Osorio-Arellanes, of El Fuerte in the Mexican state of Sinaloa, to avoid the death penalty through his plea. He could face life in prison when he's sentenced on March 1.

Authorities haven't said which member of the rip-off crew was believed to have fired the fatal shot at Terry and have declined to say whether the weapon used to kill the agent was linked to an Operation Fast and Furious purchase.

Osorio-Arellanes told investigators he raised his weapon toward the agents but didn't open fire.

Of the five men accused in Terry's killing, two are in custody. Three others remain fugitives.

The FBI says it's actively pursuing the fugitives and has offered a $250,000 reward for information leading to the capture of each of the three men.

The Associated Press contributed to this report.