The Federal Bureau of Investigation's desire to keep cellphone-tracking devices known as "stingrays" under wraps could make things more difficult for the government as it tries to prosecute the case of a man who was tracked by the feds using one of the devices, the judge in the case said.

U.S. District Judge David G. Campbell told an Arizona courtroom Thursday that he was not inclined to let the government present factual evidence regarding the stingray in a closed session without the defendant present.

"That...