Probation for a convicted sex offender charged with raping a 6-year-old boy in a library was revoked Thursday after the judge watched a videotape of the child saying it was like being attacked by a "T-rex and an alligator."

Corey Saunders, 26, is accused of raping the boy Jan. 30 while the child's mother worked on a computer just outside the room and less than 10 feet away at the New Bedford Free Public Library.

At the time, Saunders was on probation after serving four years in prison for the attempted rape of a 7-year-old boy. He was sentenced to the maximum five years in prison Thursday.

On the video, the younger boy spoke calmly and bluntly as he described how Saunders lured him between bookshelves at the library's magazine room and raped him orally.

"He said, 'Can I touch you?' and I said, 'No,' and he went right in and touched me, and he was touching my privates," the boy said in response to questions from a child welfare official.

The boy said Saunders first approached him as he sat at a table reading books in the magazine room. He and Saunders eventually went down an aisle between bookshelves, where he said Saunders raped him.

Afterward, the boy said he dressed, "and then I ran."

After watching the 20-minute video, Judge Robert Kane said he found the boy "certainly credible" and his account of the alleged rape "sequential, coherent and detailed."

Prosecutors said Saunders violated his probation both by committing a new crime and by having unsupervised contact with children.

Saunders' attorney, Alan Zwirblis, had asked the judge to sentence him to two years. Zwirblis did not immediately return a message left later Thursday.

Saunders, who was released from prison in 2006 over objections from prosecutors and psychologists, will begin serving the sentence immediately as he awaits trial on the new charges.