A police officer testified that he took a bag of marijuana and a still-hot pot pipe out of the pockets of Sopranos star Robert Iler when he arrested the teen on robbery charges.

Officer Brian O'Donnell said that after receiving a report of a street robbery by several teens last July 4, he found Iler, three other boys and a teen-age girl sitting on a Manhattan park bench.

When he asked the youths what they were doing, they replied that they were just smoking cigarettes and "hanging out," O'Donnell said.

O'Donnell, testifying at a pretrial hearing on Monday, said he confronted them because they fit the description of the group who had robbed two other youths of $40 a few blocks away.

Iler, 17, Michael Cournede, 20, and Alban Selimaj, 17, were arrested and are charged with second-degree robbery. All have pleaded innocent.

As O'Donnell searched the three, a patrol carrying the robbery victims arrived. He said he was later told that the victims had identified the males in the park as the robbers.

O'Donnell said the girl was released after the victims said she did not take part in the holdup. A fourth boy, who was 15, was turned over to juvenile authorities and his case is being handled by Family Court.

Defense lawyers said the suspects were searched without proper cause and that their statements were taken without their being told their rights. The lawyers are asking the court to disallow as trial evidence any physical evidence and statements made to police.

Iler plays the pot-smoking, mischievous Anthony "A.J." Soprano Jr. on the HBO mob drama The Sopranos.

If convicted of second-degree robbery, he and the others each face up to 15 years in prison.