SOMERVILLE — A Passaic man today was convicted of having cocaine last year in a taxi in Bernards Township, but was acquitted on a charge of intending to distribute the drug.

After a two-day trial, jurors found Ismael Rodriguez, 35, not guilty of possession of cocaine with the intent to distribute, but they convicted him of the lesser offense of possession of cocaine. Rodriguez also was convicted of hindering his own apprehension.

Sentencing is scheduled for Nov. 22.

The Somerset County Prosecutor’s Office Organized Crime and Narcotics Task Force had received information that an individual would be traveling in a taxi in the area of Commonwealth Drive in Bernards with a quantity of cocaine, authorities said.

On surveillance in that area on June 14, 2012, detectives stopped the taxi that Rodriguez and another man had traveled in from Passaic, Somerset County Assistant Prosecutor Jamin Cooper said. That other man and the taxi driver did not know about the cocaine found in the vehicle, Cooper said.

As detectives ordered the occupants to exit the vehicle, Rodriguez was focused on an area near the floor of the taxi, Cooper said. In that area, detectives later found a ripped-open bag of cocaine that had been pushed through a hole in the floor, Cooper said.

But Rodriguez’s attorney, Matthew Katzenbach, told the jury there was “no evidence whatsoever of any sale” of cocaine.