Julie Hamp
Hamp was the highest-ranking employee at the Japanese companyReuters

Former Toyota executive Julie Hamp has been released from custody after allegedly smuggling illegal painkillers into the country.

Hamp was arrested on 18 June after customs officers in Japan detected 60 tablets of oxycodone in a package sent to the businesswoman.

The painkiller is a legal prescription drug in the US and Japan, but Japanese law does not allow the import of the drug.

After the arrest, Hamp stepped down from her role as chief communication officer. She was the highest-ranking female employee at Toyota and was relocated to Japan in an effort to diversify the company's executive ranks.

Hamp was appointed as chief communications officer in April 2015, in one of the first significant steps made by Toyota towards gender equality. The company is known for its poor diversity record.

Now, a Japanese man called Shigeru Hayakawa has temporarily taken over from Hamp, a major setback for the company's diversity efforts.

Following Hamp's arrest, a Toyota spokeswoman said: "We are confident ... that once the investigation is complete, it will be revealed that there was no intention on Ms. Hamp's part to violate any law."

Japanese law allows a suspect to be held in custody for 23 days without charge but prosecutors had to decide whether they would indict the female executive before 8 July. Hamp has been released without charges.