Did you have your cell phone with you? I would have simply held it up while hitting 911 and hold your finger over the send button so he can see it. If that doesn't stop him hit the button and put it on speaker as you request police assistance as you're being harassed and threatened.
While waiting for the police to show up if the person isn't intelligent enough to take off, take video proof of him yelling and threatening you with you not antagonizing or responding in any way to him. Pretty hard for him to build a case against you when you have evidence to the contrary, that evidence might be enough to have a complaint against him filed and maybe even evicted.
Jasmine - Female Miniature Poodle - born Aug 15, 2010
Loker Delgado Von Stalworth - Male GSD - born Jan 26, 2012
Koda & Zazu - 5 year old male cats
Alex - Male Cocker Spaniel (rescue) - RIP Cuddlebug 2007-2010