Image copyright AFP Image caption Julie Hamp was arrested on 18 June on the suspicion of illegally importing a prescription drug into Japan

Toyota's managing officer Julie Hamp has resigned from the company after she was arrested last month for allegedly bringing illegal drugs into Japan.

The firm said in a statement that Ms Hamp informed it of her intention to leave her role and they had accepted.

She was arrested last month on the suspicion of illegally importing the painkiller oxycodone in the mail.

The American became the firm's chief communications officer and first female managing officer in April.

The world's biggest carmaker said it had accepted Ms Hamp's resignation after considering the concerns of its stakeholders.

It added that the investigation on the former executive was still continuing and there was "little" the company could say at the time.

"However, we intend to learn from this incident to help ensure a secure working environment for everyone at Toyota around the world as we continue to take the steps necessary to become a truly global company," it said.

"We remain firmly committed to putting the right people in the right places, regardless of nationality, gender, age and other factors."

High ranking role

Ms Hamp, 55, was a key female figure in the carmaker's push for diversity at the company and her arrest made headlines in the local media.

President Akio Toyoda held a news conference after her arrest to apologise and said the executive had not intended to break the law.

Ms Hamp, meanwhile, is accused of importing 57 tablets of the prescription drug in a package labelled "necklaces" addressed to herself.

Oxycodone is a legal substance in the both the US and Japan, but can only be brought into Japan if it is carried by a person with a legitimate prescription.

Last week, police had raided Toyota's headquarters in Toyota City and Tokyo after Ms Hamp's arrest on 18 June.