When lightning struck a tree near Sgt. Bobby E. Beasley at Fort A.P. Hill two summers ago, he was thrown about 20 feet but survived his brush with death.

"All it took was coffee and a cigarette" to get him back on his feet after the incident, Col. Robert Simpson said Monday at Beasley's funeral, reading the testimonials of the Virginia Army National Guardsman's comrades who remain in Afghanistan.

Beasley, 36, of Inwood, W.Va., did not have such luck with an explosion in Ghazikel, Afghanistan. He died Aug. 7 after his vehicle hit a bomb on the side of a dirt road.

The blast, which is under investigation, also killed Staff Sgt. Craig W. Cherry, 39, of Winchester, Va., and an Afghan interpreter. Beasley and Cherry, who were close friends, were assigned to the Virginia Guard's 3rd Battalion, 116th Infantry Regiment, in Winchester. The battalion is part of the 1st Brigade, 29th Infantry Division (Light) with headquarters at Fort Belvoir.

Their deaths came less than a month after they arrived in Afghanistan.

During the burial at the Rosedale Funeral Home and Cemetery, seven soldiers fired a salute that rumbled across the open blue sky like thunder. Dogs in the rural neighborhood surrounding the cemetery returned the salute with excited barking.

More than 400 people packed the funeral home, which seats 300. Among them were dozens of uniformed mourners, including Army personnel in dark green suits and workers from Kraft General Foods in Winchester, Beasley's civilian employer, in burgundy, collared T-shirts.

Gov. Robert E. Wise Jr. (D) ordered state flags at all state facilities to be flown at half-staff to honor Beasley.

Sgt. 1st Class Hampton Thomas, Beasley's platoon sergeant, recalled the soldier as a practical joker who once handed him a fistful of jelly beans and watched his reaction. "The first few tasted very fruity and [good], until I got to the jalapeno peppers," Thomas said.

He also recalled Beasley's less humorous, "moody" moments, before he met his wife-to-be, Juanita, now 32, and married her four years ago.

"I think she pretty much told him she wasn't going to put up with that," Thomas said, referring to moments when Beasley seemed to want to be left alone.

Beasley's wife selected a burial plot under a tall pine tree and near an American flag, to reflect her husband's love of nature and country. He served four years in the Navy and 12 years in the Guard.

His family requested that the song "American Soldier" by Toby Keith be played during the memorial service. Its lyrics brought tears to many eyes:

You can bet that I stand ready, when the wolf growls at the door

Hey I'm solid, hey I'm steady, hey I'm true down to the core.

As the sun beat down on the outdoor burial service, the scent of fresh dirt, lilies and pine sap settled over the slightly sweating crowd. Observers clutched boxes of cigarettes, cell phones and boxes of facial tissues.

Other soldiers remembered Beasley for letting comrades with children make calls home before he did. The Beasleys had no children. During Christmas season, he also let fathers and mothers schedule their return dates before he did, according to written messages from his comrades.

"He was like a brother to them," Beasley's wife said. "Their platoon is like a family."

Beasley and about 570 other soldiers were called to active duty March 1. The unit spent nearly four months training at Fort Bragg, N.C., and arrived in Afghanistan on July 14.

Beasley and Cherry were conducting "presence patrols" in villages, confiscating weapons, setting up traffic checkpoints and keeping alert for Taliban activities that could interfere with presidential elections scheduled for Oct. 9.

Two summers ago, Beasley's friend Cherry also survived the lightning incident during a military training camp. He was knocked to the ground after the bolt struck a tree near them. Both men joked about the incident.

Cherry was buried Friday in Winchester.

Sgt. Bobby E. Beasley's wife, Juanita, right, and her mother, Janie Shirley, grieve at the graveside. Behind them are Staff Sgt. Marie Diaz, Juanita Beasley's brother Richard Basore and his son Brian.