“Iran has everything to do with what has happened to our lives,” Mr. Ghavamian said. “I was a stateless person when I met Ray,” he added. “Meeting this strange man with a candy store in the East Village helped me reconsider what it means to be Iranian.”

New York is filled with immigrants who can share proud tales of how they got here, but the story of how Asghar Ghahraman became Ray Alvarez is particularly improbable, and he’s gotten skilled at telling it beside the humming ice cream machines in his store. He assures listeners that everything is true, and his devoted fans do not seem to question this dramatic creation story much.

“I was born on top of the mountains of Tabriz,” he said. “My sister raised me. I thought she was my mother. I don’t know if she’s still alive. Probably not.” He started selling cigarettes and combs at opium houses in Tehran when he was 14. An army recruiter approached him a few years later.

“You want to join the navy?” said the man.

“What’s a navy?” replied Mr. Alvarez.

“Come here. I’ll show you. Sign this. Good. Now we’re shipping you out to the Persian Gulf in a week.”

Mr. Alvarez was soon working in the boiler room of an Iranian warship. When it was assigned to tour the East Coast of America, Mr. Alvarez saw a golden opportunity. “I wanted America,” he said. “Tanks. Airplane. Niagara Falls. Tall women. ‘Gone With the Wind.’ I wanted it all.” But Mr. Alvarez faced an obstacle: he wasn’t assigned to the tour. “I had to be on that ship,” he said. “So I borrowed money and bribed my lieutenant to get me aboard.”

The destroyer anchored off the coast of Norfolk, Va., in 1963 and Mr. Alvarez started biding his time, memorizing deck patrol schedules, until he acted on his plan. As he tells it, he leapt from the ship one night and swam two miles to shore where, soaking wet, he caught a train to Miami and slept beneath a bridge. “The alligators looked at me like I was a piece of steak,” he said. “But I had America in my pocket. That was all that mattered.”

He enjoyed life under the Florida sun until authorities nearly discovered he was undocumented, and he boarded a bus that arrived in New York one snowy afternoon in 1964. “I had a different name each week afterwards,” he said. “I was Oscar. Then I was Ray. At my job office the guy said, ‘Hey, weren’t you Ray yesterday?’ I told him, ‘Yes. I am both.’” Mr. Alvarez finally became a waiter and settled into a cramped apartment in Alphabet City. When he heard that a local candy shop was for sale, he made an offer for it, inspired to become his own boss. He has worked in the shop between East Seventh and St. Marks Place and lived in the same apartment above it ever since. “Compared to my life before, everything after has been a picnic,” he said. Mr. Alvarez didn’t witness the Iranian Revolution in 1979 but he kept his store open throughout the Tompkins Square Park riots a decade later. “I was protective of the protesters,” he said. “I sold them 40-ounce beer bottles, and they would throw them at the cops.”