Johnny Depp suffered an injury while on location for “Pirates of the Caribbean: Dead Men Tell No Tales” in Australia over the weekend, Variety has confirmed.

According to insiders, Depp will be flown back to the United States to have surgery.

He was not working at the time of his injury, and just how Depp, 51, hurt himself was not disclosed.

Production is expected to be minimally impacted by the star’s absence — scenes will be shot around Depp’s character, Captain Jack Sparrow, for the next few weeks.

The film, which began shooting last month, is not expected to move off its release date of July 7, 2017.

“Pirates 5” also stars Javier Bardem and Brenton Thwaites, with “Kon Tiki” directors Espen Sandberg and Joachim Rønning at the helm.

In the fifth installment of the “Pirates” franchise, Jack Sparrow finds the winds of ill fortune blowing even more strongly when deadly ghost pirates led by his old nemesis, the terrifying Captain Salazar (Bardem), escape from the Devil’s Triangle, determined to kill every pirate at sea … including him. Captain Jack’s only hope of survival lies in seeking out the legendary Trident of Poseidon, a powerful artifact that bestows upon its possessor total control over the seas.

The last “Pirates of the Caribbean” grossed over $1 billion at the worldwide box office.

The Wrap first reported the news.

Correction: An earlier version of the story said that Depp was injured on set. He was not working at the time of the injury.