Like any New Yorker, I look pretty self-assured when I’m inside the bodega waiting to give my breakfast order. But until I’ve got my coffee and sandwich in hand, I’m as vulnerable as I’d be wearing nothing but a hospital robe.

Which is why, on the day that the counter guy told me he couldn’t make me a bacon, egg and cheese because he was out of bacon, I just stared at him with my mouth open. And why I began sucking air in short, ragged breaths when he suggested that he could make the sandwich with turkey bacon instead.

But New Yorkers are survival artists, and by instinct I was already searching for a way out. I soon found the answer, right behind the curved glass of the deli case.

Pastrami.

My modest hope was that pastrami would make a plausible stand-in for bacon just this one time so I could get on with my day. What I discovered is that pastrami is better than bacon. Although, taste being subjective and context being everything, it would be more accurate to say that I like it better than bacon in the specific setting of a breakfast sandwich whipped up quickly and double-wrapped in wax paper and foil by the nearest bodega or deli.

A few years ago, I called the B.E.C., or bacon-egg-and-cheese on a roll, “the classic and possibly highest formulation” of the bodega breakfast sandwich. Classic it remains, but I no longer think of it as the apogee of the form.

These days, I prefer the way pastrami sheds its cracked coriander and pepper on the eggs, swabbing them with a more potent dose of spice than they could ever get from a flyaway sprinkle out of a pepper shaker. I like the way pastrami chews, too — pliant but also just rubbery enough to slow me down so I can’t inhale the whole sandwich in under a minute, which is alarmingly easy to do when it’s made with thin slices of deli bacon fried until there’s nothing left but crunch. While you’re eating a pastrami-egg-and-cheese, you have time to think about it. Later, you remember it.

The sandwich’s sensory qualities are its chief recommendations in my book. But it also has what you might call cultural advantages over the B.E.C.

A lot of places can claim bacon, but pastrami belongs to New York. Originally from Romania, it is one of the foods brought here by the great influx of Central European immigrants who were so influential in shaping the city’s appetites in the late 19th and early 20th centuries.

As for the bread, the traditional container for a bodega breakfast sandwich is the hard roll or kaiser roll, which, with a characteristic star pattern slashed into its top crust, came to the city from Austria. To my mind, bringing these two foods together in one sandwich results in a pleasing geographic and cultural unity.

I also like that the P.E.C. may be open to a wider variety of New Yorkers than the B.E.C. While bacon is prohibited by Jewish dietary laws, pastrami is not. This is how it found its way into the pork-less egg rolls sold in kosher delis like Gottlieb’s Restaurant and Mill Basin Deli, both in Brooklyn, and Pastrami Queen in Manhattan. (Pastrami egg rolls entered the nonkosher mainstream a few years ago at the Chinese restaurant RedFarm, which fries them up in its Manhattan locations and its branch in Austin, Texas.)

Not many rabbis are likely to bless the marriage of pastrami, eggs and cheese, but a dairy-free pastrami and egg sandwich might pass muster.

You’re more likely to find a pastrami-egg-and-cheese at newer, more assimilated Jewish establishments. S. & P. Lunch, the luncheonette formerly known as Eisenberg’s, makes one with Muenster cheese and pickled green tomatoes on griddled rye. It’s called the Lil’ Shonda, the name an implicit acknowledgment that the rules of kashrut have not been strictly followed. (In Yiddish, shanda means scandal.)

At Shelsky’s Brooklyn Bagels, they make their version of a P.E.C. between slices of rye bread by default, though I think the sandwich sits just as comfortably on a bialy or onion roll. Frankel’s Delicatessen & Appetizing, also in Brooklyn, prefers a house-baked challah roll. It’s a good choice, but the main attraction of the Frankel’s sandwich is the hand-carved slabs of Frankel’s pastrami, which is thought by some eaters to be among the best in the city.

For Muslim New Yorkers, finding a halal pastrami, egg and cheese sandwich may take some doing. The pastrami at most bodegas is made from conventionally slaughtered beef, but Moe’s Pastrami & Burger, which opened two years ago in Brooklyn, makes a version of the sandwich with halal meat.

It may be hard for people in other parts of the universe to appreciate the role that the breakfast sandwich plays in the culture of New York City. One indication of its importance is that the mayoral candidates were asked about their go-to order several times this year, most recently in a debate in October.

“Eggs and cheese on a roll,” Curtis Sliwa replied. “No salt, please.”

“Same thing, no salt also,” was Andrew Cuomo’s response.

Zohran Mamdani, who was elected on Tuesday, distanced himself from the pack a bit: “Egg and cheese on a roll with jalapeños.”

All respectable answers. But imagine a mayor who stood up and voted proudly for pastrami, egg and cheese.

That would be leadership.