Joint Base Lewis-Mcchord, Washington (CNN) -- A military judge sentenced a soldier accused of being part of a rogue Army "kill squad" that murdered civilians in Afghanistan to three years in military prison and to receive a bad-conduct discharge Friday.

At the opening of his court martial for allegedly killing civilians in Afghanistan, Army Specialist Adam Winfield pleaded guilty to manslaughter and use of an illegal controlled substance.

Winfield is one of six soldiers from the 5th Brigade, 2nd Infantry Division who, while on assignment in Afghanistan, are accused of participating in illegal killings of civilians and covering up the alleged crimes by making it appear as if they were insurgents. An additional six soldiers are accused with lesser crimes in the case, including helping to cover up the killings.

Winfield originally faced five charges including murdering three Afghan civilians, but Friday accepted a plea agreement with prosecutors to plead guilty to lesser charges and agree to testify against other soldiers in the case. He faced a maximum of 17 years behind bars.

With time already served, Winfield will serve about two more years and will be demoted to the rank of private. He will also receive a bad-conduct discharge, rather than the more severe dishonorable discharge.

During his testimony Friday, Winfield told the military court that he was afraid of his Staff Sergeant.

He said Sgt. Calvin Gibbs concocted "scenarios" where the men would select Afghan civilians to murder and then place weapons on them so they would appear to be insurgents who had attacked U.S. forces first.

During a May 2010 mission to a village called Qualaday, Winfield testified that Sgt. Gibbs pointed to an unarmed Afghan man.

"Is this the guy?" Winfield testified Gibbs asked him and Pvt. Jeremy Morlock.

"I had an idea that Sgt. Gibbs was looking for a kill," Winfield testified.

The soldiers separated the man from his wife and young children, Winfield said. Then, he said, they killed the man by throwing a grenade at his feet and shooting him. They later claimed the Afghan man had thrown the grenade at them.

Winfield said Friday he fired his automatic weapon away from the man as to pretend to have taken part in the alleged murder. But he admitted he did nothing to keep his fellow soldiers from carrying out the alleged execution of an unarmed civilian.

"I didn't say no, I didn't object to it," Winfield told the court.

Winfield said the group's alleged ringleader, Sgt. Gibbs, was concerned he would talk about the alleged murders. Gibbs, Winfield said, threatened that he could kill him and make it look like an accident had taken place while Winfield was repairing a vehicle or working out in the gym. When Winfield went to speak with an Army Chaplain about depression he was suffering from, he said Gibbs intercepted him.

"Sgt. Gibbs reminded me I shouldn't be talking about things I shouldn't be talking about," Winfield testified.

Although Winfield said he was pressured to keep quiet, he testified no one forced him to take place in the alleged killings.

"If I had done my duty, he would still be alive," Winfield said, referring to the Afghan man he said his fellow soldiers murdered.

In March, another soldier, Pvt. Morlock, pleaded guilty to killing that man and two other Afghan civilians for thrills and covering up the murders.

Morlock's chilling testimony painted a picture of soldiers gone rogue -- abusing drugs, executing Afghan civilians they referred to as "savages" and posing in photographs over the dead men. Morlock is serving a 24-year sentence in prison.

Sgt. Gibbs, who also faces court martial in the case, has said the killings were justified under Army rules of engagement. Gibbs is also accused of taking body parts from the dead men to keep as grisly souvenirs.

Winfield's father, Christopher Winfield, previously told reporters that his son had told him about the alleged killings and that he was afraid that his fellow soldiers might target him for speaking out. Christopher Winfield said he tried to report the group's alleged actions to the Army but was ignored.

The Army has said it is investigating the claims made by Winfield's father that he tried to alert officials about the alleged murders.

During testimony Friday, both of Winfield's parents lashed out at the Army for what they called a failure to act on the information they had provided. But Emma Winfield said her son takes responsibility for his part in the alleged murders.

"Adam definitely understands the error that he made," she said. "He is filled with remorse."

In halting testimony before he was sentenced, Winfield told the court: "I was sorry for what happened here, I wish it didn't go the way that it did," he said. "I wish I had been braver."