Cillian Murphy’s portrayal of the vicious gang boss Thomas Shelby in Peaky Blinders caused a rise in the popularity of old-fashioned flat caps over the past seven years.

And now the star’s new role in the biographical thriller Oppenheimer is having a similar effect on a different type of headgear.

Retailers are reporting an increase in demand for fedoras, a style similar to the hat Murphy wears in his portrayal of the “father of the atomic bomb”.

John Lewis is now selling 21 percent more fedoras than flat caps, while specialist hatters Herbert Johnson says it is seeing increasing demand for the style from a younger demographic.

J Robert Oppenheimer’s hat was central to his iconography. Alongside the film’s costume designer, Ellen Mirojnick, both Murphy and director Christopher Nolan were involved in the process of choosing the final hat.

The hat “completes Oppenheimer’s silhouette perfectly,” says costume designer Ellen Mirojnick. Here, the scientist wears his favorite accessory in the late 1940s.

“I think of Oppenheimer like a rock star,” Mirojnick said. “He was very particular about his look. It was memorable. He embodied the power of communication like no other.”

Nolan requested that Mirojnick not dress any other characters in hats, even though the film spans many decades where hats would have been the norm.

In an interview with the LA Times, Nolan said the hat was so specific “like Freddie Mercury’s teeth.”

“It’s like artfully disheveled hair, it takes a lot of fussing, and I often fussed with the hat just before a take.”

Mirojnick was unable to track down the original hat but was given several photographs of Oppenheimer wearing it at Princeton and during his time at Los Alamos laboratory where he developed the bomb.

“I think of Oppenheimer like a rock star. He was very particular about his look.”

Featuring a wide brim, Mirojnick said the hat worn by Oppenheimer in real life was not technically a fedora as it had a flat rather than pinched crown.

“It’s commonly mistaken for a porkpie hat too. Instead it’s like a cross between the two.”

Due to its unique design (Mirojnick believes Oppenheimer may have sourced it in New Mexico) she commissioned a hatmaker to emulate it.

In the show Peaky Blinders, which is set in 1920s England, Murphy’s character, right, is known for wearing old-fashioned flat caps.

The first three makers she tasked all failed to get it right.

“It was a really difficult hat to make,” Mirojnick said. “It needed a particular quality of fabrication and to sit on Murphy’s head a certain way.”

In a final attempt, Mirojnick contacted the LA-based hatters Baron Hats, who specialize in film.

Working from reference pictures, the company’s founder, Mark Mejia, started by taking Murphy’s measurements on an antique conformator which gives an exact impression of head size and shape. After making a specific hat block, Mejia met Mirojnick, Murphy and Nolan for a fitting.

“It was different from anything that we’ve made before.”

The biggest challenge Mejia faced was the fabrication.

Made from undyed beaver felt, Mejia says it is lighter in weight than most hats on the shelf. “It’s not a material people work with too often now so I had to order special material for the film.”

Two months later, the final hat was ready.

Mirojnick said she knew “it was perfect” when she took the hat out of the box and placed it on Murphy’s head.

“This particular hat makes such a statement. It completes Oppenheimer’s silhouette perfectly. Even if you just saw his shadow you would know it was him.”

Chloe Mac Donnell is the deputy fashion-and-lifestyle editor for The Guardian