Absolutely disgusting!

You did what many people would have done in your circumstances, protecting your property and loved ones.
It's no wonder they said they could arrest you, hoping you might take the attitude you seem to be taking.

I'd do as some have suggested, get some legal advice anyway, just for peace of mind

Edit:
Agree you should speak to someone just for support.
All the best