New York City was once Donald J. Trump’s playground, the place where he made his name and then plastered it everywhere he could.

Now, the city that helped make him rich and famous has become his battleground. And Mr. Trump keeps losing.

His conviction this week was the third and heaviest blow the former president has been dealt in his erstwhile hometown this year — a series of challenges to his ego, his bottom line, and now, perhaps, his freedom.

His felony conviction on Thursday, delivered by a jury of 12 Manhattan residents, brought with it the possibility that he could eventually be imprisoned in New York, a far cry from the image he spent decades cultivating as a real estate mogul and man about town.