Actor Robin Williams says he was pulled over for riding a bike in the busy streets in New York.

The 59-year-old actor shared his recent experience during an interview with ABC morning show “The View” Tuesday while promoting his role in the new play called, “Bengal Tiger at the Baghdad Zoo”.

The “Goodwill Hunting” actor expressed his surprise when a police officer informed him of a regulation prohibiting bike riders on sidewalks.

"I didn't know there's a new regulation in New York where you can't ride your bike on a sidewalk," the actor was quoted by On TheRedCarpet.com as telling “The View” .

He continued: "I wasn't dressed in bike clothing. I had a single speed track bike and I had on a balaclava, which basically makes me look like a terrorist or a crack dealer," Williams said. "I was riding on a bike. No one was on the sidewalk. All of a sudden, 'Pull over!' I'm like, 'I'm on a bike - wow!'"

The actor told the show hosts that he was let go by the officers because one of the cops recognized him. The police officers he added told him about the new law.

"'There's a new law,'" the 'Dead Poet Society' actor quoted one of the police officers as saying. "'We won't give you a ticket this time. Be careful, there's a guy under the underpass over there who's been attacking cyclists.'"

Aside from ‘The Goodwill Hunting’ and ‘Dead Poet Society’, Williams is also best known for his role in ‘Mrs. Doubtfire’.

Trained at the Juilliard School in New York, William is not new to performances on stage as he had already appeared in plays off-Broadway. But his role as a tiger ghost in “Bengal Tiger at the Baghdad Zoo” by Rajiv Joseph, marks his stage acting debut.