I was halfway between my apartment and Dunkin’ Donuts when my first coffee of the day began to take hold.

I felt more alert, like I always do. It’s strange, really, the profound effect that a mere cup of this brown stuff can have on you, especially in the moments after consuming your first of many doses for the day.

For me, it’s the one ritualistic thing I can do immediately after waking and pissing that keeps me from entertaining the fantasies I perpetually have of retiring once again to my bed and sleeping until I awake again some hours later, feeling genuinely well-rested.

Usually, I take a sh*t immediately after I finish the first cup I make with my Keurig. Sometimes, if I’ve had a heavy meal around 2 a.m. the night before, I end up dropping a deuce about halfway through the cup. (And yes, I do indeed take the cup of coffee into the lavatory with me.) There’s nothing like starting your day off by shedding a couple quick pounds.

But on this day I was late for a meeting across town, and in my hustle to get out the door I neglected to move my bowels.

This was a mistake, but one I wouldn’t realize I had made until after I had ordered my breakfast sandwich and large iced coffee at the Dunkin Donuts a block aways from my subway stop.

“But why would you stop at Dunkin’ Donuts if you didn’t even have time to take a dump before walking out the door?”

Great question.

When I was on my way to the subway station, an M Train passed overhead. This meant I have 15-20 minutes until the next one came, which is enough time to stop at Dunkin’ and fuel up a little bit before doubling back to the station in time to board the next passing train.

I was standing by the counter where everyone collects his or her order when I was suddenly seized by an undeniable urge to fart. Usually, I’m adept at holding these things in, but on occasion I’ll get hit with one that comes with an assaulting and painful stomach pang. I’m convinced that if I do not expel these bouts of flatulence immediately, they will destroy my insides. Plus I live in New York City, where the smell of a fart is not going to deter most people from their daily bustle, even if it is in a place where food is prepared and sold.

So I let one rip.

And: uh-oh.

I was expecting gas. Not liquid.

I had sharted in Dunkin’ Donuts.

I had SH*T MY PANTS in a restaurant. At age 26.

It’s an unmistakable feeling, pooping in your pants. And it’s not one you ever forget, not even when it hasn’t happened to you in about two decades.

Luckily (if luck can ever factor into soiling one’s drawers), I noticed what was happening as it was happening, enabling me to clinch and prevent a massive feces expulsion.

What is one to do in this situation?

My meal was already bought and paid for, so I waited for it.

I stood there very uncomfortably for nearly five minutes. This Dunkin’ Donuts was even slower than usual.

When my items were ready, I snatched them and hurried in a strange clinched way out the door.

I was now going to be much, much later for my meeting than if I had stopped at home to pop a quick squat before rushing out the door in the first place. But sometimes these things happen.

I chucked my boxer briefs, cleaned myself up and did a quick victory fist pump when I realized none of my body fluids had seeped onto my jeans.

Then I headed back out the door. On my way, I called the colleague I was scheduled to meet to tell him I was going to be late. I apologized profusely. He said not to worry about it. I worried, though, because it was a meeting about a job prospect, which is a meeting one should never be tardy for.

When I finally showed up, about 30 minutes late, I began apologizing again in person.

“I’m usually more punctual,” I said. “I was going to lie to you and say I got stuck underground because a woman had a stroke on the train or something, but if we’re going to work together, I feel like I should be honest with you.”

“I like honesty,” he said.

“Good. The real reason I’m late is that I shit my pants in a Dunkin’ Donuts when I was on my way here.”

I got the job.

Honesty is the best policy, guys.