A man accused of running around Galliagh in Derry in an "enraged state of mind" with a handgun and a can of petrol has been refused bail.
John McGinley, of 123A Bloomfield Park, is charged with possession of a firearm or imitation firearm with intent to cause fear of violence and possession of a petrol can with intent to damage property.
The 40-year-old is also accused of threats to kill a man and woman, threats to damage a property at Glendale Park and possession of a wooden stick.
The charges relate to an alleged incident on March 25.
Derry Magistrates Court heard allegations that McGinley approached teenage girls on the Glengalliagh Road and pointed the gun at one of their heads. He is also accused of pointing the gun at the head of a teenage boy in the Glendale Park area of the city.
An investigating officer said they had received reports the 40-year-old threatened to burn someone in that area out of their home, however police are still trying to locate this person.
McGinley is also accused of stepping out in front of a car, forcing it to stop and pointing the gun at the car.
It was claimed the female driver feared for her safety and the safety of her two children who were in the car.
The court also heard allegations that local residents took the gun from McGinley and was handed into a local priest.
Opposing bail, the officer said police fear he may return to carry out the threats to burn someone out of their home or may interfere with witnesses as their names had appeared in the local press.
The officer also said there was a "genuine fear if released on bail the community may exact revenge on him" as they are very angry about the incident.
It was revealed that an initial assessment of the gun found it to be a small black metal automatic weapon.
Refusing bail, Deputy District Judge Peter King said: "Quite frankly anybody who thinks they can behave as if they are on a Quentin Taratino set and not expect the courts to treat it seriously has a misplaced optimism in the philanthropy of the court."
The judge said he had concerns about the alleged threats, possible interference with witnesses and the "community reaction if he should remain at large.
The 40-year-old was remanded in custody and will appear in court again via videolink on April 12.