A man has been charged with making threats to kill following armed police descending on a town centre.