Lynn D. “Buck” Compton, an Army paratrooper whose World War II service was portrayed in the book and HBO miniseries “Band of Brothers” and who later as a prosecutor secured a conviction of Robert F. Kennedy assassin Sirhan Sirhan, died Feb. 26 at his home in Burlington, Wash. He was 90.

He had complications from a heart attack, said his daughter Syndee Compton. Mr. Compton retired in 1990 as a judge on the California Courts of Appeal.

Mr. Compton fought in some of the war’s fiercest battles as a first lieutenant with E Company, 2nd Battalion, 506th Parachute Infantry Regiment, 101st Airborne Division. The soldiers, collectively known as Easy Company, participated in the June 6, 1944, invasion of Normandy, parachuted into Holland for the disastrous Operation Market Garden, and fought through frostbite and German artillery in the Battle of the Bulge.

At 6 feet, 220 pounds, he had been a two-sport varsity athlete for the University of California at Los Angeles before he became an Army officer in 1943. He was a catcher alongside future major leaguer Jackie Robinson and played guard on the Bruins’ line in the 1943 Rose Bowl. (UCLA lost 9-0 to the University of Georgia.)

In his 2008 memoir, “Call of Duty” (written with Marcus Brotherton), Mr. Compton recalled leaning out of a C-47 transport plane about 1 a.m. on D-Day.

Lynn D. “Buck” Compton, an Army paratrooper whose World War II service was portrayed in the book and HBO miniseries “Band of Brothers,” died Feb. 26. He was 90. (Family Photo )

“In the moonlight, I could see the Normandy coastline in the distance,” he wrote. “It looked surprisingly peaceful in spite of what I could only imagine lay ahead. Tracer bullets and anti­aircraft started to appear, red, blue and green tracers, spectacular and deadly against the night sky.”

After regrouping on the ground, Mr. Compton and 1st Lt. Richard “Dick” Winters led an assault on a German artillery emplacement near Brecourt Manor.

The battery was heavily fortified and protected by 50 German sentries. Entering a trench, Mr. Compton’s baseball instincts took over when he saw German soldiers retreating.

“The distance to the fleeing enemy was about the same as from home plate to second base,” historian Stephen Ambrose wrote in the 1992 book “Band of Brothers.” Mr. Compton “threw his grenade on a straight line — no arch — and it hit a German in the head as it exploded.”

For capturing the position and saving countless Allied lives, Mr. Compton received the Silver Star — the military’s third-highest medal for valor in combat.

During Operation Market Garden, Mr. Compton was directing his men in battle when he was shot in the buttocks. He received the Purple Heart.

Upon recovering from his wounds, Mr. Compton rejoined Easy Company for the worst fighting the unit encountered in the war. Holed up in a forest near Bastogne, Belgium, during the Battle of the Bulge, the soldiers endured below-freezing temperatures and heavy snow while German forces splintered the trees with artillery fire.

“I had seen men die before. I had seen men get wounded before,” Mr. Compton wrote in “Call of Duty.” “But this was different. This was unprecedented gore.”

After one battle, Mr. Compton emerged from his foxhole to find the mangled bodies of a dozen of his men, their blood staining the snow. He ran to find medical treatment for the wounded before sitting down on a fallen tree and sobbing over the loss of his friends.

“He had stood up to everything the Germans had thrown at him,” Ambrose wrote in “Band of Brothers.” “But the sight of his platoon being decimated, of his . . . friends torn into pieces, unnerved him.”

He was relieved from his position — officially for a severe case of trench foot — and spent the rest of the war away from combat.

In the 2001 Emmy Award-winning HBO miniseries, adapted from Ambrose’s book and co-produced by Steven Spielberg and Tom Hanks, Mr. Compton’s character is played by Neal McDonough.

Lynn Davis Compton was born Dec. 31, 1921, in Los Angeles. After the war, Mr. Compton worked his way through Loyola University’s law school as a detective in the Los Angeles police department. He graduated from Loyola in 1949.

His first marriage, to Jerry Star, ended in divorce. His wife of 46 years, the former Donna Newman, died in 1994. Survivors include two children from his second marriage, Syndee Compton and Tracy Compton, both of Burlington; and four grandchildren.

In 1951, Mr. Compton became an assistant district attorney in Los Angeles. He led the team of prosecutors assigned to the 1969 trial of Sirhan Sirhan, a 24-year-old Jordanian immigrant who assassinated presidential candidate Robert F. Kennedy in the Ambassador Hotel kitchen.

Sirhan had said he vehemently disagreed with Kennedy’s support of Israel. During court proceedings, Sirhan’s lawyers argued that their client was mentally unstable.

In his closing statements, Mr. Compton attacked the defense.

“Did Robert Francis Kennedy, a young, highly successful man at the peak of his career . . . breathe his last breath on the dirty floor of a pantry in the Ambassador Hotel among the mops and dirty dishes . . . because he supported the Israeli state or because he became a complicated father image in the mind of Sirhan B. Sirhan?”

Mr. Compton told the jury: “If you buy all this, you have to turn him loose. But if you don’t buy it, there’s nothing left but a plain, old, coldblooded first-degree murder.”

The jury found Sirhan guilty. He is serving a life sentence in prison.

In 1970, California Gov. Ronald Reagan appointed Mr. Compton to the state’s appellate court. Toward the end of his career, Mr. Compton became a forceful advocate for patients in “right-to-die” cases.

In 1986, he ruled that a woman incapacitated by cerebral palsy — and who wished to die by starvation — be allowed to refuse medical assistance and to have her physicians remove a feeding tube that was keeping her alive. In the end, the woman, Elizabeth Bouvia, decided not to commit suicide.

In an opinion, Mr. Compton wrote: “Whatever choice Elizabeth Bouvia may ultimately make, I can only hope that her courage, persistence and example will cause our society to deal realistically with the plight of those unfortunate individuals to whom death beckons as a welcome respite from suffering.”

“If there is ever a time when we ought to be able to get the ‘government off our backs,’ ” Mr. Compton wrote, “it is when we face death — either by choice or otherwise.”