South Africa batter Zubayr Hamza has been suspended for nine months after accidentally taking his father's heart medication.
The pills contained the banned substance Furosemide.
The ban for taking them will rule him out of the tour of England later this year.
Hamza, who has played six Tests and a One-Day International for South Africa, had intended to take his own anti-allergy medication, but ingested the wrong pill according to his submission to the ICC's Integrity Unit.
The International Cricket Council has accepted his explanation and reduced his suspension from the usual two years to nine months, back-dated to March 22 this year.
The 26-year-old Hamza will therefore be eligible to resume his career in December. He would have been in contention to tour England in August and September having been a mainstay of recent Test squads.
"It is a timely reminder to all international cricketers that they remain responsible for anything they put into their bodies, to know exactly what medication they are taking so as to ensure it does not contain a prohibited substance and does not result in an anti-doping rule violation," Alex Marshall, General Manager of the ICC's Integrity Unit, said on Tuesday.
Hamza's performances between January 17 and March 22 have been expunged from the records, including his scores of 25 and six in the innings and 276-run first Test loss to New Zealand in February.
Australian Associated Press
Sign up for our newsletter to stay up to date.