DANGEROUS TRADE: Ex-locksmith Daniel Ferraris — who was revealed by The Post yesterday to be selling master “firefighter keys” on eBay—says he will no longer be hawking them after a city fire marshal asked him to stop.Warzer Jaff

(
)

Angry city officials yesterday vowed to close dangerous loopholes that could allow terrorists unfettered access to subway gates, firehouses and any building elevator using “master” keys meant only for authorized personnel.

The Post yesterday detailed how retired New Jersey locksmith Daniel Ferraris was legally selling on eBay an assortment of the city’s “master” keys, which open all of its electrical panels, elevator controls, traffic-light relays, subway entrances and fireboxes, as well as some firehouses.

The keys also allow full access to construction sites such as the World Trade Center.

Politicians blasted the murky laws that allowed Ferraris to put thousands of buildings and city services at risk.

“We cannot let anyone sell the safety of over 8 million people so easily,” Public Advocate Bill de Blasio said.

“Having these keys on the open market literally puts lives at risk. The billions we’ve spent on counterterrorism have been severely undercut by this breach.”

The key sets are distributed to every city firefighter and electrician. Ferraris has said he bought some of his from collectors.

For a mere $150, a Post reporter obtained the keys to the city from Ferraris — no questions asked.

Now officials want answers.

“This is not the first time I’ve heard of this type of situation, where unauthorized keys are in the hands of potentially dangerous individuals,” said Councilman Peter Vallone Jr., who chairs the council’s Public Safety Committee.

“There are laws which cover this. There are some loopholes that need to be closed.”

Vallone said he will introduce legislation that would make possession, sale or duplication of such keys a crime punishable by up to a year in jail, a move backed by Council Speaker Christine Quinn.

Vallone said the city also should consider changing all the affected locks — an ambitious proposal considering the tens of thousands of locks that would be affected.

“Every emergency elevator — how many buildings have elevators?” said Councilman Dan Halloran. “There are thousands. How many subways with platform key doors? Hundreds. There’s an incredibly large swath of the city at jeopardy. It’s a daunting task.”

A spokesman for Mayor Bloomberg said current procedures involving all-access keys are under review.

“Fire marshals are investigating, and we are reviewing current procedures and penalties, including laws and rules, to make sure proper controls are in place,” the spokesman, John McCarthy, said.

The NYPD says buying or selling the keys could be a crime — possession of burglar’s tools, a misdemeanor punishable by up to one year in prison — but enforcement hinges on intent, a loophole that swings the door open wide.

There also appears to be no law requiring authorized users to turn the keys in when they quit or retire.

Ferraris, 69, said he has been collecting such keys for more than 30 years and selling them since 2005. He declined to say how much money he has made.

He said the Post story got him a call from a city fire marshal.

“He said it is not illegal to sell these keys, but could I please stop selling them,” Ferraris recalled. “I told him I absolutely will stop selling them. I didn’t think there was any problem. I sold them only to collectors.”

As of yesterday, Ferraris’s eBay sales had ended.

Officials at eBay did not return a call seeking comment.

Sources said it was unlikely Ferraris would face criminal charges. Complicating the case is the fact that Ferraris lives in New Jersey. Officials at the federal Department of Homeland Security did not return a call for comment.

The keys could have once been the property of an FDNY lieutenant, although officials could not connect him to the badge number associated with the set.

An FDNY spokesman said the issue is being investigated.

The keys Ferraris sold included a “1620” firefighter key that FDNY sources say could trap thousands of people in a skyscraper by sending all elevators to the lobby and out of service.

“With those elevator keys, you could do a lot of damage,” a retired firefighter said.

“You can go to any floor of any building. So if a terrorist wanted to get into the Empire State Building, onto any floor, they could. You can pretty much control the elevators completely just with that key.”

An FDNY lieutenant said, “This guy should be prosecuted for selling something like that.

“If the wrong person got those keys, it could be very dangerous. You can take complete control of any city elevator with that key. The possibilities are endless. You never know what people might think up.”

Such keys have been used in crimes, including sexual assaults of several women in Brooklyn.

Cops said a city EMT, Angus Pascall, used his “fireman’s key” to disable elevators and sexually assault women in a string of attacks before his arrest in 2010.

The Post published pictures of the fire service keys, only after checking with locksmiths who said duplicates could not be made without the originals in hand.