An international fitness expert has escaped drug convictions - pending a $30,000 donation to charity - to enable him to expand his brand in the United States.
Josef Rakich, 23, was successful in his application for a discharge without conviction in the High Court at Auckland this afternoon despite admitting to selling at least 200 class-C pills and conspiring to sell 2600 in October 2011.
The pills sold by him and associates were class-C chemicals but were marketed as ecstasy.
Rakich is the chief executive of Josef Rakich Fitness, an online personal training website which has information on nutrition, muscle building and supplements information.
It has almost 1.7 million followers on Facebook, 500,000 Instagram followers, more than 50,000 on Twitter and almost 35,000 on YouTube.
"Transforming my physique has helped me in so many aspects of my life. Having a lean and ripped physique gave me a lot of ... job opportunities with extremely good pay, I must say," he said on his website bio.
Crown prosecutor Anna Pollett opposed the discharge without conviction, highlighting the commerciality of the crime, but Justice Ailsa Duffy disagreed.
She granted the application forwarded by Rakich's lawyer Adam Couchman, who said his client had changed his ways in the last three years and become a fitness phenomenon.
"Not only did he step away from the offending but made something of his life... he's effectively turned himself into a success story," he said.
The discharge was dependent on a $30,000 payment to the Salvation Army which the court heard Rakich could pay today.
Mr Couchman said Rakich was granted a bail variation to attend the Mr Olympia expo in Las Vegas in September, where he was set to be a headline feature.
But the US consulate declined his visa application because of the charges before the court.
Justice Duffy said the sponsors took a financial hit and fans and potential business associates were unable to meet Rakich.
The court heard how the company had grown since 2011 when it made a profit of $4000 to 2014 when it had sales of more than $800,000 - the vast majority coming from overseas sales.
Justice Duffy called the offending "poor judgement calls" and said there was a clear risk the business could collapse if Rakich was unable to travel overseas.
She also said a psychologist's report describing the defendant's immaturity and need to fit in lowered the gravity of the offending.
Rakich's has not been shy online about telling fans of his financial success.
On social media he bragged about some of the luxury toys he owns, including two matching jet skis and an orange Lamborghini Gallardo - on which he has the licence plate "RAKICH".
"I have always said that before I turn 25 I will own a Lamborghini. I'm an entrepreneur, I love investing and I love working hard," he wrote.
"I want to someday be known as the top fitness model/fitness icon in the world."
His co-offender Michael Don Reeves, 25, avoided a prison term for his role in the drug dealing.
The bricklayer - who hoped to become a professional kickboxer - sold 9148 pills at about $25 each, making more than $228,000 over the course of a few months.
Justice Duffy sentenced him to a year on home detention and 200 hours' community work.
- Additional reporting Sam Boyer of the New Zealand Herald