I'm assuming this wasn't a two or more lane (in one direction) highway. Because I'm sure you know that slower traffic should always keep to the right and not stay in the fast lane.
But if it was just one lane for the direction you were traveling in and some yahoo is tailgating, the most important thing is don't let'em get to you. Just do the speed limit (or even slightly under

) and ignore them. If they are seriously too close, as your "friend" seemed to be, then by all means
don't hit the brakes...that's a "punk" move. (Not that I've never done it myself, but I've also done a lot of stupid things over the years.) Instead of hitting the brake you should simply let off on the gas, and slow down 5 to 10 mph. If they get even closer, then slow down another 5 - 10 mph. It also helps to occasionally glance in the rear-view mirror and give them a big friendly smile.
And when you reach a two lane portion of the road and they punch it to drive around you, wave at them and smile. It's ok to pretend like your flipping them off, but don't...you're better than that...just wave and smile and be content with the knowledge that at that particular moment your blood pressure is
much lower than theirs is.