A U.S. Army helicopter pilot pleaded guilty to negligent homicide on Thursday, admitting he was showing off before his Black Hawk helicopter (search) crashed in Afghanistan (search) last year and killed the crew chief.

Under a plea agreement, Chief Warrant Officer 3 Darrin R. Rogers, 37, was sentenced to 120 days at Fort Leavenworth military prison in Kansas and forfeiture of all pay and allowances. He also must retire from the Army but will retain his pension.

Judge Col. Debra Boudreau (search) had sentenced Rogers to four years and two months imprisonment, forfeiture of all pay and dismissal from the Army.

The plea agreement, however, superseded Boudreau's sentence because it capped the maximum punishment for Rogers.

"I'm not a bad person," Rogers said when he was asking the judge for leniency. "All I wanted to be was in the military."

Rogers also pleaded guilty to pleaded guilty to reckless endangerment, failure to carry out a lawful order and destruction of government property.

Before accepting his plea, Boudreau had asked Rogers whether he was showing off when the US$6 million (euro4.6 million) Black Hawk helicopter crashed last August.

"Yes, ma'am, basically I was trying to impress the guys in the back," Rogers said.

The career pilot was in the air waiting to start a demonstration to show a visiting military commander how the transport helicopter can deliver troops to the battlefield quickly.

An Army investigation report said Marines on board the helicopter twice urged Rogers, "Fly hard." The first time he refused, but the second time the response from the cockpit was: "You asked for it."

Rogers testified he performed a move in which the helicopter ascended rapidly and then dropped, causing a feeling of weightlessness. He said a piece of equipment drifted into the cockpit, jamming the controls and preventing him from pulling out of the dive.

The Black Hawk plunged to the ground, killing Sgt. Daniel Lee Galvan, 30, and injuring the 14 other people on board.

Investigators said Rogers conducted "maneuvers unnecessary for the mission."

Rogers entered the guilty pleas at the start of his court-martial.

Galvan's parents sobbed as they testified as the sentencing phase of the trial got under way. His mother, Nelda Galvan of Moore, Oklahoma, said she was "angry that my son lost his life for no good reason, especially since he trusted Mr. Rogers with his life."

Galvan's widow, Sonya Galvan of Lubbock, Texas, also attended the trial. She told The Associated Press she hopes the court-martial makes other pilots aware of the consequences of their actions.

"He has no idea how much my kids are struggling, how this has affected our lives," she said.

After the 12-hour court-martial, Galvan's family said they were disappointed with the sentence and that nothing could have been done to relieve their pain.

But Sonya Galvan said she was pleased that Rogers will never fly again for the Army and "he'll never be able to do this to anyone else."

She said her husband, who aspired to be a pilot, has "finally earned his wings."

"My husband is finally able to fly and rest," she said.