04/24/2002 at 01:00 AM EDT
Robert Iler, who plays wayward son Tony Jr. on "The Sopranos," has managed to skip jail. In a legal move that has been deemed a surprise, the actor, 17, pleaded guilty Tuesday to a misdemeanor larceny charge in exchange for three years' probation -- instead of prison time -- for his involvement in a Manhattan stick-up last July, reports The New York Times. Iler, who was in possession of a bag of marijuana and a hot pipe when he was arrested, had been charged with two counts of second-degree robbery, a felony that could have meant a 15-year prison sentence, had he been convicted. Iler and three other young pals were accused of taking $40 by force from two 16 year olds on Manhattan's Upper East Side. Iler also could have gotten a year behind bars for the lesser misdemeanor charge relating to the drug-possession. But under the terms of the plea agreement in State Supreme Court in Manhattan before Justice Daniel FitzGerald, says The Times, Iler was given the lighter sentence under youthful offender status. If he continues to behave, his record shall remain sealed. During the two-day pre-trial hearings this week, Iler looked worried, said The Times, though he finally managed a grin on Tuesday just prior to his plea being entered. Following Judge FitzGerald's dismissal, he rushed out of the courtroom and declined to answer any questions.