— Urban legends have to come from somewhere. And as if to lend credence to the long-held, widely scoffed-at belief that alligators live in the underground sewer system of the Big Apple, a little crocodilelike reptile apparently came crawling out of a storm drain in the Queens community of Astoria Sunday afternoon.

The carnivorous critter made its debut at 3 p.m. when local folks saw it seek refuge underneath a blue Datsun parked on a city street. And the neighborhood soon filled up with spectators angling for a look at something that usually shows its face only in folktales.

“It was like the urban legend washes up from the sewer and says, ‘What the heck am I doing here?’ ” onlooker Joyce Hackett told the New York Times.

“That’s the craziest thing I’ve ever seen,” Elizabeth Ferguson, who lives on the block, told the New York Post. “He was really small, but mean-looking.”

Gator or croc?Adding to the urban mythology, and public confusion, was exactly what had emerged from the storm drain, which was overflowing due to the heavy rains that hit New York City Sunday. The first passerby to spot the creature screamed out, “Crocodile!”

But police spokesman James Duffy was initially noncommittal on the issue, telling the New York Times, “We’re not sure if it’s an alligator or a crocodile, because we’re not zoologists.”

Actually, the creature turned out to be a caiman, a crocodilian reptile. Crocs can be dangerous, but there was little menace in the 18-incher that turned up on the Astoria street.

“No one had to come and wrestle with it,” Duffy told the New York Times. “It’s not big enough to eat a dog — maybe a mouse.”

Where’d it come from?But the question remains: Did it really come from the sewer? Witnesses insist it’s so, but the NYPD refused to commit to something that only furthers an urban legend.

“It’s a big mystery,” Duffy told the New York Post. “It could have been dumped from a car, or it could have come out of a sewer.”

And while the sewer scenario makes for a better movie script, Michael Pastore, director of field operations for the nonprofit Brooklyn organization Animal Care and Control, told the New York Post: “Somebody probably dumped him there.”

David Quinn, of DQ Pest Control, told the Times most alligators or crocodiles who make it as far north as New York City come from folks who visit down South and decide to bring one back home with them as a pet. When the critters get too big to manage, their fickle owners usually dump them in a pond.

Pastore subscribes to a similar belief. “My guess is that someone obtained it as a pet, brought it home, and Mom and Dad ... threw it out on the street,” he told the New York Post.

In fact, two to four alligators, crocodiles or caimans are found in New York City each year. A reptile hunter was summoned from Florida to catch a 2-foot caiman living in a lake in Central Park in 2001, and in 2003, cops corralled a 4-foot croc roaming a Queens park. Pastore said he’s seen about 20 caimans and alligators turn up in the Big Apple over the past 15 years.

So what became of the Queens mystery reptile? The New York Post reports that it spent Monday basking comfortably under a 100-watt heat lamp at Animal Care and Control, and on Tuesday would be transported to a new home at an animal sanctuary in Pennsylvania’s Pocono Mountains.

On Sunday, after taping its snout shut, police hauled their alligator to the station house, where it was picked up by Animal Care and Control. The alligator’s eventual home will likely be at a reptile sanctuary.

The runaway reptile will never know it became a living, breathing, urban legend. But according to onlooker Hackett, maybe it should.

“Hopefully, this thing will get its own reality show,” Hackett told the New York Daily News.