Actor Glen Powell has lost a friend from his childhood -- a police officer killed in a shooting.

Powell, 31, revealed in a Friday Instagram post that Officer Justin Putnam was killed while responding to a domestic violence call in Texas.

In his post, Powell included photos of himself and Putnam from their childhood, as well as several recent photos and a video of a procession of police cars, presumably in honor of Putnam.

MEGHAN MARKLE, PRINCE HARRY MOURN LOSS OF 18-YEAR-OLD FAN IN HEARTFELT LETTER

"A week ago my friend, Officer Justin Putnam, was shot and killed while responding to a domestic violence call in San Marcos, Texas," the caption began. "He’d been one of my closest friends since I was eleven years old."

Putnam was killed and two other officers were injured on April 18 before the gunman killed himself, investigators said.

"This past week I’ve been reflecting on our friendship, living in memories, watching old videos, and trying to sum up someone who marched alongside me in so many different chapters of my life and whose approach to life really helped define my own. Justin was a spark of joy," Powell continued. "He was goofy, enthusiastic, fearless, and loyal. Justin loved everyone and everyone loved him; he had an ability to make everyone feel like his best friend."

BRAD PITT APPEARS AS DR. ANTHONY FAUCI IN SECOND AT-HOME 'SNL' EPISODE

The actor called Putnam a "great officer" and said he had a "twinkle of mischief in his eyes."

"He would do just about anything for a good story or to make people laugh," remembered Powell. "I always found it truly hilarious that the guy who convinced me to break more laws as a teenager became a police officer. But it made sense because he was always a protector, of his family, his friends, and to anyone who needed help."

June 12, 2018 - New York, New York, United States - New York, NY, USA - June 12, 2018: Actor Glen Powell attends the New York special screening of the Netflix film 'Set It Up' at AMC Loews Lincoln Square  (Credit Image: © Sam Aronov/Pacific Press via ZUMA Wire)

Glen Powell remembered a childhood friend, a police officer who recently was killed in a shooting. (ZUMA Press, File)

Powell said being a police officer gave Putnam "happiness everyday because he could come to the rescue of someone in need."

"These are uncertain times that highlight the things we can take for granted. But more importantly the people we can take for granted," Powell continued. "Tomorrow isn’t promised, but today please thank the men and women putting themselves in harm’s way to ensure our safety."

CLICK HERE TO GET THE FOX NEWS APP

The "Hidden Figures" star added: "I’ll miss you, JPut. See you on the other side."