Actually, had the opposite of an almost awesome encounter happen in my current campaign - the friendly encounter that wasn't. The PCs started in a town that was quite xenophobic and also bigoted against non-humans. Not long after entering the town, the party elf got pegged by a rotten tomato and the whole gang got tossed into jail when a crowd around them got rowdy. (the town guard was fair & let the PCs out the next morning) - the PCs then went to find accommodations at a local inn/tavern and were accosted by some locals where I really played up their "out of town" status, including the ole "yer not from around here, are ya?" . So, needless to say, that they didn't exactly feel welcome in town...
I had a planned encounter later on when those locals went to get an evil cleric of a deity that believes in racial purity and used him to help try to knock some sense into the PCs and send them out of town... but, afterwards, I had planned what I thought was a nice friendly encounter - some locals who were more friendly to the PCs were going to applaud them for taking down the locals and the evil cleric, and then hook them into a major plot point.
Well, the evil priest stepped out in front of the PCs and said he had bribed the guards to stay out of that section of town for the night and then the locals tried to jump the players - after a tough combat, the PCs won and killed the evil cleric. However, they were so paranoid about being found amidst a bunch of dead locals, that they immediately high-tailed it out of town - not even stopping to bury the bodies or search them that thoroughly. I had thought I had said the guards were avoiding that part of town, but they still didn't want to take the chance.
I had planned to have some locals arrive when they were wrapping up the battle, and the locals would thank them for taking out the evil priest and then introduce them to a local group opposed to the neighboring nation of slavers through an NPC they had met earlier. However, that encounter didn't take place because they hightailed it outta Dodge so quickly, so they still have that sour taste in their mouths about the town - and, it's been several sessions later and I still haven't been able to work that plot point into the story yet.