When you travel to countries around the world with your pets, you have to obey country laws and have your animals sometimes tested, vaccinated and quaratined for entry. These rules apply to everyone, even celebrities. 

Johnny Depp and his wife, actress Amber Heard, learned this lesson the hard way when they snuck Yorkshire Terriers, Pistol and Boo, into Australia. The couple failed to declare their dogs at Australian customs and without the proper biosecurity procedure, and it nearly cost the dogs' their life.

On Thursday morning, Australia's agriculture minister Barnaby Joyce gave the "Mortdecai" star 50 hours to fly the dogs back to the U.S. or they'd be "put down," reports the Guardian.

Depp and Heard wasted no time complying. The couple reportedly remained in Australia after placing the terriers on a private jet at Brisband airport. The dogs left Queensland on a flight to the U.S. on Friday.

Also on Friday, Joyce issued a statement explaining the matter which had quickly become an international incident since it involved celebrities.

"Two dogs that were brought into Australia without meeting our import requirements have now been exported back to their country of origin. A Department of Agriculture officer has escorted the two dogs from the property in Queensland, where they had been held under quarantine order, to the airport for their flight home," the statement reads. "The department issued the necessary export documentation and correspondence to the relevant veterinary authority to facilitate the repatriation of the dogs. All costs associated with returning the dogs were met by the owners."

The agriculture minister then tweeted, "Dogs gone," confirming the situation had been resolved.

Depp and Heard will likely be fined for breach of customs and quarantine regulations.

The couple have been staying at a Coomera, Queensland mansion as Depp shoots the latest installment of the "Pirates of the Caribbean" franchise on the Gold Coast.

Heard nor Depp has commented publicly about the matter.

Dogs imported to Australia must have a valid import permit along with relevant testing and health checks signed off by a government veterinarian from the exporting country, according to Joyce.