If it’s hard to imagine the frontman of Metallica as a Utah Highway Patrol trooper, now you don’t have to — because James Hetfield is playing one in an upcoming movie.

Hetfield, the guitarist and singer for the legendary metal band, recently shot scenes in director Joe Berlinger’s biographical drama about serial killer Ted Bundy, “Extremely Wicked, Shockingly Evil, and Vile.”

Berlinger this week posted on Instagram a photo from the set, with Hetfield in a UHP uniform, in an interrogation room with Bundy, played by Zac Efron.

Hetfield plays Bob Hayward, the UHP sergeant who cornered Bundy in his tan Volkswagen Beetle on Aug. 16, 1975. When Hayward searched the car, he found pantyhose, a ski mask, a crowbar, an ice pick and handcuffs. Hayward arrested Bundy and contacted his brother, Pete, then in charge of detectives for the Salt Lake County Sheriff’s Office, which took over the case.

Hayward died Aug. 4, 2017, at the age of 90.

Utah Highway Patrol trooper Robert "Bob" Hayward poses in uniform in this undated photo. Courtesy Hayward family.

Bundy eventually was convicted of kidnapping Carol DaRonch in Salt Lake City, and sentenced to 15 years in prison. Prosecutions in other states followed, and he escaped custody in Colorado twice before being captured in Florida in 1978. There he was convicted of murder, and executed in 1989. Before his death, he confessed to 30 homicides in seven states.

The movie, now filming in Kentucky, tells Bundy’s story from the viewpoint of his girlfriend, Elizabeth Kloepfer, played by Lily Collins. The cast includes John Malkovich as Judge Edward Cowart, who presided over Bundy’s murder trial in Florida. The movie also stars Angela Sarafyan (“Westworld”), Jeffrey Donovan (“Burn Notice”), Kaya Scodelario (“The Maze Runner”), Jim Parsons (“The Big Bang Theory”) and Haley Joel Osment (“The Sixth Sense”).

Berlinger and Metallica have some history. Berlinger and his late filmmaking partner Bruce Sinofsky directed the crime documentary “Paradise Lost: The Child Murders at Robin Hood Hills,” about the West Memphis 3 murder case, in 1996, and used Metallica’s music as the soundtrack. In 2004, Berlinger and Sinofsky directed the documentary “Metallica: Some Kind of Monster,” which detailed the band’s sessions with a therapist while recording the “St. Anger” album.

The Bundy biopic is Hetfield’s first acting role, apart from some voice cameos in some animated TV shows.

No release date has been set for the independently produced film.

FILE - In this July 29, 2017, file photo, James Hetfield of Metallica performs during the band's concert at The Rose Bowl in Pasadena, Calif. Metallica and Dave Matthews are headlining a wildfire relief concert on Nov. 9, 2017, in San Francisco. (Photo by Chris Pizzello/Invision/AP, File)


Correction: Feb. 18, 8:50 a.m. >> An earlier version of this story misspelled the name of Carol DaRonch.