A judge has thrown out a former DJ's claim that pop star Taylor Swift got him fired by falsely alleging he had groped her.

David Mueller said he lost his job over Swift's accusation and had been seeking $3m in compensation.

That alleged groping is the subject of a closely watched court case that saw Swift testify this week.

Fans queue up to see Taylor Swift in court

Judge William Martinez tossed Mr Mueller's case saying he had failed to approve that Swift intentionally set out to get him fired, the Associated Press reported.

In courtroom testimony about the alleged incident, Swift said she endured groping that was “horrifying and shocking”.

“It was a definite grab,“ she said. “It was intentional.”

Swift's assault and battery suit against Mr Mueller will still proceed with closing arguments expected to be heard next week.

The pop star has sought only $1 in damages, which her attorney characterised as an attempt to send a message against sexual assault.

Swift's former bodyguard, Greg Dent, also gave evidence that the pop star had been groped.

He said he was several steps away from Swift and positioned so he could see Mr Mueller reach under her skirt.

​Mr Dent testified that he only looked for Mr Mueller after a pre-concert photo session was over and Swift complained.

Mr Mueller's attorney, Gabriel McFarland, tried to get Mr Dent to say why he did not react immediately.

"I didn't sense danger after he touched her," he said.