Afghani taxi driver Mohammed Nadir Darwesh has walked free after a judge said it would be a farce to continue with his trial and threw out all the sex allegations against him.

The jury was discharged on the second day of the trial in Christchurch District Court when Judge David Saunders ruled it unsafe to proceed.

The trial had heard evidence from two 16-year-old girls who said they accepted an offer of a free taxi ride, in daytime, from Christchurch's Barrington Mall.

They were driven to the Pioneer Stadium carpark where the driver, Mr Darwesh, centrally locked the taxi doors and indecently assaulted them.

The credibility of the girls was clinically demolished in cross-examination by Mr Darwesh's defence counsel Paul Norcross, who questioned them about their honesty and their past offending, and the reasons they had texted and called afterwards demanding $200 or they would go to the police.

One of the girls ended up breaking down in tears and storming from the witness box.

Mr Darwesh told police the girls called his cab and then offered sex for money and he declined, saying he was married.

He had given them $20 to get lunch, because it was Ramadan and as a Muslim it was better to help people. But he suggested they get jobs rather than sell themselves.

He had kept the threatening text messages that arrived soon afterwards on his cellphone and was able to show them to police.

At the end of the crown case, Mr Norcross applied to have the case dismissed and Judge Saunders agreed, throwing out two charges of indecent assault and two charges of unlawfully detaining the girls to have sexual connection with them.

He said one of the girls said she could not remember being touched, and it was clear from the phone records that five text messages had been sent from the car during the time they said they were being detained. These had not raised anyone's alarm.

He said the veracity of one of the girls had been called into question by the defence counsel because of her prior history of dishonesty, her manner of giving evidence, and the threats she had made of accusing Mr Darwesh of rape.

"Only a jury returning a perverse verdict could really find him guilty in respect of these matters," the judge told the jury.

"It would frankly be a farce to continue with the matter at this stage. I see by the nods from some of you that you agree."

He said he hoped that the jury would not feel that their time had been wasted. Since the courts stopped holding depositions hearings last year, prior to trials, the taking of evidence had become the first time people saw "the true colours of people making these complaints".