A man arrested more than two dozen times for posing as a transit worker to steal buses and trains in New York City and drive the routes has been paroled.

Darius McCollum was released Tuesday night, after pleading guilty earlier this year to stealing a Trailways bus in 2010, when he was arrested behind the wheel on the highway that leads to Kennedy International Airport.

He had faced up to 15 years if convicted at a trial, but the Queens district attorney and his lawyer worked out a deal: McCollum will voluntarily enter a program to undergo cognitive behavioral therapy. He was diagnosed with what was until recently called Asperger's syndrome but is now referred to as an autism spectrum disorder, and his repeated arrests stem in part from it.

He told The Associated Press Wednesday he plans to get in touch with a nonprofit to help him find a therapist, and work or vocational school.

"I'm actually happy. It was a rough process but I finally made it," he said, adding his outlaw days were behind him. "I can't afford to get arrested again, I can't deal with the jail thing — it's too much, the gang mentality."

McCollum, 49, had the subway map memorized by the time he was 8, and tried unsuccessfully to get a job with the transit system. Instead he became a transit impostor and has been arrested 29 times. But he is not a violent criminal — he just drives the routes, fixes tracks and takes tolls without an official job until he's caught by police.

McCollum has become a celebrity for escapades that began at age 15, when he piloted a subway train six stops without any passengers noticing. He grew up in Queens near a station serving two Metropolitan Transportation Authority lines, and learned the mechanics of the transit system from workers who took an interest in him.

Part of the problem is McCollum wasn't diagnosed with the disorder until recently. He was first handed literature on the topic about 10 years ago during a Manhattan case, but the judge refused to order a psychiatric evaluation after she said she looked the disorder up online and decided he didn't have it. A treatment program had never previously been proposed as a solution to his crimes.

Prosecutors, the judge and his attorney are all hopeful he'll be able to stay out of trouble. McCollum said Wednesday he won't let them down. He's staying with friends in Queens for now, and was spending his first day of freedom in Manhattan with filmmakers making a documentary about his life.

He got to 34th street on the subway.

"I went down into the station, got a metro card, got on a train, and here I am," he said.