Dequan Townsend has accepted a six-month suspension from the U.S. Anti-Doping Agency (USADA).

The suspension comes after Townsend (18-8 MMA, 0-1 UFC) was flagged for an in-competition urine test that detected the presence of cocaine metabolites. USADA announced the suspension Wednesday.

Townsend’s upcoming fight against Bevon Lewis at UFC on ESPN+ 24 on Jan. 25 will not be effected because the suspension is retroactive to the date before his June 28 UFC debut. The suspension ended Dec. 28.

Townsend tested positive for bezoylecgonine (cocaine) and norfentanyl (fentanyl) metabolites. Both metabolites are “prohibited in-competition and are considered Substances of Abuse under the UFC Anti-Doping Policy and the UFC Prohibited List,” according to USADA.

Townsend was given a reduced suspension due to his ability to prove the substance did not enhance, or wasn’t intended to enhance his performance, according to USADA. Additionally, Townsend completed a drug rehabilitation program.

Townsend, 33, took his UFC debut on less than one week’s notice. At UFC on ESPN 3, Townsend stepped in for Justin Ledet and faced fellow newcomer Dalcha Lungiambula at light heavyweight. Townsend was finished by strikes early in Round 3.

UFC on ESPN+ 24 takes place Jan. 25 at PNC Arena in Raleigh, N.C. The card streams on ESPN+.