(CNN) Australia swim star Shayna Jack has confirmed she tested positive for a banned substance in the lead up to the World Championships in Gwangju , South Korea.

Jack, 20, withdrew from the event just days before she was supposed to compete citing "personal reasons".

But on Saturday, Jack published a statement in which she confirmed she had tested positive for a banned substance on June 26.

"It is with great sadness and heartache that I had to leave due to allegations of having a prohibited substance in my system," Jack wrote in a statement on her Instagram and Facebook page.

"I did NOT take this substance knowingly. Swimming has been my passion since I was 10 years old and I would never intentionally take a banned substance that would disrespect my sport and jeopardize my career.

"Now there is an ongoing investigation and my team and I are doing everything we can to find out when and how this substance has come into contact with my body. I would appreciate if you respect my privacy as this is very hard for me to cope with."

Shayna Jack of Australia competes during the 2018 Commonwealth Games.

Swimming Australia confirmed in a statement on Saturday that it had been notified of an adverse test result following a routine out-of-competition drug test conducted by the Australian Sports Anti-Doping Authority (ASADA).

Leigh Russell, CEO of Swimming Australia, said the governing body would continue to provide support for Jack but underlined its clear and unambiguous opposition to performance enhancing drugs.

"Swimming Australia is and always has been committed to a clean sport. We have consistently supported a zero tolerance approach to doping and have been strong supporters of a rigorous and consistent approach to drug testing both here and overseas," Russell said in a statement.

"Under our system, if a swimmer returns an adverse test, they are automatically given a provisional suspension and stopped from competing until such time as the ASADA process is complete and an outcome determined.

"As you would expect we are bitterly disappointed with allegations a swimmer has a prohibited substance in her system although it is important to point out that the matter is yet to be determined. We will continue to provide appropriate support for Shayna. We will also provide support for our team members who are still in Korea and our team and our organization will continue to reaffirm our zero tolerance approach."

Australia's Mack Horton refused to stand on the podim with China's Sun Yang.

The news of Jack's positive test will be of great embarrassment to Australian swimming given the leading role her teammate Mack Horton has played in protesting against China's Sun Yang in Gwangju.

Horton came second to Sun in the men's 400-meter freestyle event last Sunday, then refused to acknowledge his Chinese competitor, who he has previously called a "drug cheat."