Virginia Governor Terry McAuliffe is embraced by a Virginia State Police trooper after he and his wife Dorothy McAuliffe, left, attended the funeral for Trooper-Pilot Berke M.M. Bates at Saint Paul's Baptist Church in Richmond, Virginia. (Chip Somodevilla/Getty Images)

RICHMOND — More than 1,000 mourners gathered Friday to remember Berke Bates, the state trooper-pilot, devilish practical joker, father, husband and friend to Virginia governors who died last weekend while patrolling the skies over a white nationalist rally in Charlottesville.

Gov. Terry McAuliffe, first lady Dorothy McAuliffe and three of their five children – who knew Bates intimately when he served on their security detail -- were among those who gathered at St. Paul’s Baptist Church.

McAuliffe (D) told the congregation that his wife and children are “heartbroken” over the death. Bates had only recently transferred to the state police aviation unit and remained close to the McAuliffe family. The day before he died, he had contacted the governor about sending a care package to the McAuliffe’s oldest son, a Marine recently deployed to the Middle East.

“I think this is the first time a governor has had to preside over the funeral of a member of the executive protection unit,” McAuliffe said. “These individuals live with me 24 hours a day, seven days a week. They’re part of our family.”

Bates was killed Saturday, the day before his 41st birthday, along with State Police Lt. H. Jay Cullen, 48. Cullen’s funeral is Saturday.

The Bell 407 helicopter that Cullen piloted crashed just outside the city where protesters clashed with neo-Nazis and Ku Klux Klan members. Hours earlier, a car plowed into the protesters and killed a 32-year-old woman, Heather Heyer.

A Virginia native, Bates met his wife, Amanda, in Florida; they were married in Richmond and have 11-year-old twins, a boy and a girl. He was an avid hockey player and coach.

Dozens of youth hockey players he had coached attended the services, donning their hockey jerseys in many cases over shirts and ties.

Law enforcement officers from 22 states and as far away as Alaska joined the services, as did former Republican governors Robert F. McDonnell and James Gilmore, and the two candidates in this year’s race to succeed term-limited McAuliffe: Lt. Gov. Ralph Northam (D) and Republican Ed Gillespie.

The two-hour service featured bagpipe music, a helicopter flyover and occasional laughs, as friends and law enforcement colleagues recalled his wicked sense of humor.

McAuliffe remembered the day Bates escorted his youngest daughter, Sally, to her first day of high school in Richmond. A newcomer to the city and school, she little embarrassed about arriving in a state SUV, so she tried to slink away unnoticed.

“Sally gets out,” McAuliffe recalled. “Berke proceeds to turn on the lights, the siren, and speaker: ‘Sally McAuliffe has arrived at school.’”

And that care package Bates told the governor he mailing to the Marine? The fellow Irishman, who rang in St. Patrick’s Day with McAuliffe every year at Rosie Connolly’s pub in Richmond, told the governor he was sending his son Jameson Irish whiskey.

He’s in the military, McAuliffe protested. And in Muslim country, no less.

“I’ve got it in a Listerine bottle. They will never know,” McAuliffe said Bates told him.

Mischieviousness aside, Bates was remembered as a proud father to his children, Deacon and Kylee, and as an earnest and dedicated trooper.

Col. W. Steven Flaherty, the State Police superintendent, credited Bates with shooting video of the Dodge Challenger that ran down Heyer. He also captured the ensuing police pursuit and transmitted all of that video to police on the ground before the crash. Flaherty said it took a “steady hand” and the mastery of a new skill to “downlink” the video before the crash, providing authorities valuable evidence against the driver, James Alex Fields Jr.

“He captured an incredible video that shocked us in the command post,” Flaherty said. “He captured that pursuit. That is great evidence.”

The cause of the helicopter crash is being investigated by the state police, Federal Aviation Administration and the National Transportation Safety Board. There was no indication of foul play, officials have said.

Benjamin Fargo, a special agent with the U. S. Department of Homeland Security, said his one-time classmate in Florida highway patrol academy understood the awesome responsibility of law enforcement. Bates knew that “the most powerful tool we have is discretion,” Fargo said. “Not everybody needs a ticket. Not everybody needs to go to jail.”

Breaking down at the end of his remarks, Fargo concluded: “I pray that through God’s grace that I will see you again, and join you in the ranks of the mighty angels who patrol the heavens with a watchful eye for those we leave below.”