When the developers of the new Life Hotel were poking around the 19th-century NoMad building a couple years back, they uncovered what looked to be the remains of a speakeasy in the building’s basement: empty bottles of O.F.C. whiskey and other liquors.

The artifacts — along with oral history passed along from owner to new owner of the property — pointed to the space being used by the building’s residents (staff of Life magazine) during Prohibition.

So, naturally, they created their own modern speakeasy there.

Gibson & Luce opened earlier this month, complete with secret entryways and throwback cocktails.

“You get to take yourself back and imagine what it must have been like,” said Erin Pepper, vice president of brand and experience for the Life Hotel, which opened this past spring. “There are so many of these hidden gems in the city.”

Today’s speakeasies are, foremost, homages; unlike their Prohibition forebears, they’re legal. But there are certain trappings to evoke a sense of secrecy, such as an unmarked entryway or special password.

“Everyone loves that feeling,” said Adam Richman, host of “Secret Eats” on the Cooking Channel, which explores secret restaurants and off-the-menu dishes. “When you’re bringing in a friend from out of town to PDT, they walk through that phone booth for the first time — you get to feel like the man. ‘Don’t worry guys, I got the hookup.’”

In opening his first bar, Ryan McKenzie, co-founder of the creative agency Simmer, was inspired by influential speakeasy-style cocktail bars like Attaboy on the Lower East Side and Lovers of Today in the East Village. He found a cellar space in NoMad’s Radio Wave Building that lent itself to two concepts: a cafe (Patent Coffee) by day, and, opening Jan. 31, a hidden cocktail bar (Patent Pending) by night.

“Literally no one has any idea that it’s back there, which is what I love,” McKenzie said.

In addition to serving different beverages, the spaces have two distinct designs — the front is all white and airy, with greenery along the walls; the back is dark, with brass details and candlelight.

Gibson & Luce and Patent Pending join a recent wave of speakeasy-esque spots that range from an agave bar behind a freezer door in a Williamsburg deli (Mezcaleria La Milagrosa) to an intimate cocktail bar that fits three — two patrons and the barkeep — at an undisclosed location (Threesome Tollbooth) to a subterranean steakhouse in an old bank fault in midtown (Butcher & Banker).

Besides an air of elusiveness, these spots place an emphasis on, of course, the liquor. Patent Pending’s menu is crafted by veterans of the award-winning bars Dead Rabbit and BlackTail. Gibson & Luce’s specializes in obscure digestifs, as well as modern twists on classics. It even pays homage to the Prohibition era with its Black Chicken, a bourbon cocktail for two that’s served in a flask and named after a code phrase for wine, Pepper said.

“Cocktails are so forward in the dining experience now,” she said. “I love seeing it front and center.”

A crucial factor that also makes these bars possible is the unique space, whether it’s subterranean or tollbooth-sized.

“You couldn’t put a Starbucks in here,” McKenzie said of his Radio Wave cellar; the backroom called for a speakeasy.

“I think there’s something alluring and sexy and nostalgic about the concept of Prohibition,” he said. “I want you to feel like you’re in the mafia — you walk through the back entrance and you’re being taken care of. There’s just something so cool about that.”