It was an innocuous question, asked of Representative Charles B. Rangel by a reporter as he left a ribbon-cutting ceremony at a Hudson River park on Saturday morning: What should President Obama do during his visit to New York?

The congressman, who had been reminiscing on the podium about his boyhood, when he took the 125th Street trolley to the piers to watch the boats, responded with an apparently off-the-cuff quip: “Make certain he doesn’t run around in East Harlem without identification.”

By Sunday morning, that quip, with its allusion to the fatal shooting of a black off-duty police officer by a white officer, was the stuff of tabloid headlines. “Even Bam May Not Be Safe, Sez Rangel” read a Daily News headline spread across two pages. The article characterized the remark as “a warning” to the president, who made a brief trip to the city on Saturday, to watch his back. “Rangel’s Sick Joke,” The New York Post called it.

By midday, Mayor Michael R. Bloomberg had weighed in.

“I have a lot of respect for Charlie Rangel, but in this case, he’s just plain wrong,” he replied to a question about Mr. Rangel’s remark as he marched in the Salute to Israel parade.