Justin Bieber jumped the gun in his deposition Friday ... and in the process admitted he was taking Rx meds illegally.
As you know, Justin is being sued by a photog who claims the singer instructed his bodyguard to beat him up.
During the questioning, the photog's lawyer asked Bieber if he had a prescription for Xanax. Before Justin's lawyer could object, the singer blurted out that he did not.
Justin's lawyer was clearly upset and told Bieber to hold his horses before answering.
It's a significant question ... because during Justin's DUI arrest cops say he admitted his mom had given him Xanax, and he tested positive for Xanax which is the basis for the DUI charge.
It probably won't impact the case. If Bieber was under the influence it doesn't matter whether he took it legally or not.
But it wasn't the smartest thing for him to say.