Andrew Swinson had just taken the first bite of a margherita pie on the patio of Pizzoli’s Pizzeria in Logan Circle on a Friday night when a heavyset man appeared out of nowhere. Swinson, a 23-year-old consulting firm analyst from Alexandria, was having dinner with a friend who lives a few blocks from the pizzeria.

What happened next would make an ordinary meal in the heart of one of the District’s buzziest neighborhoods the star of a viral surveillance video seized from the crime scene.

On the video, released by D.C. police Thursday, Swinson and his friend are eating when the unidentified man strolls onto the patio just after 9 p.m. May 17. The man strikes up a conversation with the duo.

Then, very casually, he proceeds to rob the pair at gunpoint.

The pizzeria interloper pulls the handgun from his left pocket and flashes it briefly. Then another startling thing happens: Swinson’s friend lifts his plate and offers the robber a bite to eat midway through the robbery.

Why was everyone so calm during the stick-up? And what compelled Swinson’s friend, who spoke on the condition of anonymity for fear of retaliation, to offer a half-eaten gyro to the man robbing them?

In interviews, the men filled in the crucial answers.

When the stranger first approached them, he immediately asked, “You have any money?” The question didn’t feel threatening initially, Swinson recalled. The man seemed harmless and unhurried.

But then, Swinson said, there was a swift change in tone. “Don’t make a scene,” the man ordered. “Don’t make any sudden moves.”

Once he flashed the gun, the friends started scrambling for their wallets.

Swinson and his friend, both former James Madison University lacrosse players, said they were surprised that they were not more scared.

“It’s a good thing we’re relaxed, chill guys,” said Swinson, who had never been robbed before. “We don’t get too anxious about something like that. We could have freaked out and gotten injured, but we were letting it just unfold.”

Swinson gave the man his iPhone 4S and wallet but warned that he had no cash. (When Swinson had ordered his pizza at the counter, he’d kicked himself for not having stopped at an ATM before crossing into the city. He paid with his debit card instead.)

Swinson’s friend, on the other hand, was loaded. He had $220 in cash. Which he promptly gave up.

But the 23-year-old accountant, who’d been held up at gunpoint once before, in Philadelphia, also had an iPhone 5 that was easily visible. He wanted to conceal it quickly so he could call 911 after the robbery.

So, the accountant hatched a ruse that the Pilferer of Pizzoli’s fell for.

“Do you want any food?” he asked the robber, lifting his plate.

Once the man declined, the accountant said he surreptitiously set his plate down on a new spot on the table, covering the iPhone.

“I’ve done more impressive things in my life, to say the least,” he said. “I was just pleased I wouldn’t have to go looking for my phone in a bush. It was a work phone, too, and I would have had to go to [my managers] to get a new phone and that would have taken two weeks, ballpark, without having a phone. Plus, I didn’t want to lose all my contacts.”

The accountant’s fearlessness didn’t stop there. As the robber was leaving, the accountant halted him to make a request.

“I said, ‘Hey please just take the cash out of the wallet and leave the wallets,’ ” he recalled. “I didn’t want to have to get new licenses. So, he threw my wallet on the table and Andrew’s wallet somewhere on the ground.”

Swinson appreciated his friend’s act of derring-do.

“If I had lost the wallet, I would have been screwed the rest of the night — my driver’s license, insurance cards, credit cards, pretty much everything’s in there,” Swinson said. “My Metro card. I would have had no way of getting home.”

After it was over, the men hailed a police cruiser. They walked inside the empty restaurant and told the young woman running the cashier what happened.

“We didn’t believe it. We thought they must be joking,” said Manuel Jose, the restaurant’s assistant manager, who had been in the kitchen making pizzas at the time of the incident.

Swinson’s friend said he’s been living in the neighborhood for two months and feels safe there.

The area surrounding the restaurant has experienced a drop in violent crime this year, according to D.C. police. Armed robberies have fallen from 11 during the first six months of 2012 to six during the first six months of 2013.

Would the accountant return to Pizzoli’s for a meal? No, he said, and not because he thinks it’s dangerous.

“I thought their gyro was average,” he said. “I’ve had better.”

Swinson thought the pizza — whose dough, the restaurant advertises, is “made fresh daily on site with 100 percent organic wheat flour mixed with spring water and extra virgin olive oil” — was worth a second try.

“I won’t say I am never going to go back,” he said. “I just probably won’t sit out front on the patio. I’ll probably get it to go.”

Peter Hermann contributed to this report.