Johnny Depp’s pet dogs Pistol and Boo have been ordered by Australia to “bugger off” back to Hollywood or face being put down after he flew the terriers into the country illegally — as thousands signed a petition to save them.

The actor, who is in Australia to film “Pirates of the Caribbean: Dead Men Tell No Tales”, was given the grim warning by Agriculture Minister Barnaby Joyce on Thursday.

“Just because he’s Johnny Depp does not mean he’s exempt from Australian law,” Joyce told reporters, as the hashtag #WarOnTerrier quickly became the top-trending topic on Twitter Down Under.

Australia has strict rules to keep disease at bay, requiring cats and dogs from the US to spend at least 10 days in quarantine.

But Depp appears to have ignored the rules, arriving in Brisbane last month with the Yorkshire terriers in tow without declaring them to customs. The Hollywood star flew them in on his private jet.

“There is a process if you want to bring animals. You get the permits, they go into quarantine and then you can have them,” said Joyce, with customs authorities expected to seize the dogs imminently.

He said he became aware that Depp had the dogs with him after they were spotted being taken to a groomer.

“It’s time that Pistol and Boo buggered off back to the United States,” added the minister. “He can send them back or we will have to euthanise them.”

Asked if his tough stance may affect Depp’s view of him, Joyce replied: “I don’t think Mr Depp will be inviting me to the grand opening of the Pirates of the Caribbean.”

He told Fairfax radio it was a serious matter “because if you have breaches of biosecurity, it can have big impacts”.

– Help save them –

With Joyce giving Depp 50 hours — until Saturday — to get the dogs out of the country or face the consequences, media gathered outside his rented mansion on the Gold Coast and one news outlet, Guardian Australia, even started a countdown clock.

An online petition was started at change.org to save the pets and gathered more than 3,500 signatures within hours.

“There’s just 48 hours before Johnny Depp’s two puppies Boo & Pistol could be euthanised by Australian authorities. Please help save them!” said the petition.

Dozens of people left comments on the petition website, including Ingrid Jansen who said: “The dogs are innocent animals in this political issue.”

Graham Cohen added: “What sort of bad publicity will Australia get if we execute a very high profile screen actor’s pets?”

The issue also took a comical turn with the hashtag #WarOnTerrier trending strongly with one Twitter user saying: “The day’s gone to the dogs,” while another noted: “Not surprising really. Pirates not the type for obeying border quarantine laws.”

Depp, who stars as Captain Jack Sparrow in the Disney franchise, has been shooting on the Gold Coast tourist strip in Australia’s east.

“Pirates of the Caribbean: Dead Men Tell No Tales” is the fifth instalment in the blockbuster series, which has raked in more than $3.6 billion at the box office.

Don't let Silicon Valley control what you see. Get more stories like this in your inbox, every day.