Nearly a quarter-century after four teenagers were charged with stuffing stones down the throat of a 13-year-old boy who had seen them steal a minibike, one of Long Island's most disturbing and heavily litigated murder cases drew to an end yesterday.

Thomas Ryan, 42, pleaded guilty yesterday to attempted manslaughter for his role in the killing of the boy, John Pius, behind the Dogwood Elementary School in Smithtown in April 1979.

Mr. Ryan is the last of the four suspects to have his case resolved. He was tried twice and convicted, but those verdicts were overturned on appeal. A third trial ended in a mistrial.

Speaking before Acting Justice Michael F. Mullen of State Supreme Court, at a proceeding in Suffolk County Criminal Court in Riverhead, Mr. Ryan acknowledged he had driven three friends around to find the boy because the group was afraid he would turn them in for stealing the minibike, which prosecutors estimated was worth $5, said Mr. Ryan's lawyer, Charles S. Hochbaum of Garden City.