BATTLEFORD, Sask. – A Saskatchewan farmer on trial for the shooting of an Indigenous man says he was filled with terror in the moments before his gun “just went off.”Gerald Stanley told the jury in his second-degree murder trial Monday that he and his son heard an SUV with a flat tire drive into his farmyard near Biggar, Sask., in August 2016. He told court the two of them heard one of their all-terrain vehicles start and thought it was being stolen.Stanley told court he and his son ran toward the SUV, kicked the tail light and hit the windshield with a hammer. He said he grabbed a handgun, normally used to scare off wildlife, when the SUV didn’t leave the yard, and fired two or three shots into the air.“I thought I’m going to make some noise and hopefully they’re going to run out of the yard,” he told court. “I just raised the gun in the air and fired straight up.”Stanley said he popped out the cartridge “to make sure it was disarmed.”“As far as I was concerned, it was empty and I had fired my last shot.”He testified he went up to the SUV because he thought it had run over his wife and he tried to reach for the keys in the ignition.“I was reaching in and across the steering wheel to turn the key off and – boom – this thing just went off,” Stanley testified.“Was your finger on the trigger?” his lawyer, Scott Spencer, asked.“No,” Stanley answered.“Did you intend to hurt anyone?” Spencer asked.“No. I just wanted them to leave,” Stanley said. “I couldn’t believe what just happened and everything seemed to just go silent. I just backed away.”Colten Boushie, who was 22, was sitting in the driver’s seat of a grey Ford Escape when he was shot in the back of the head.Court has heard an SUV carrying five people, including Boushie, had a flat tire and drove onto the Stanley farm. The driver testified the group had been drinking during the day and tried to break into a truck on a neighbouring farm, but went to the Stanley property in search of help with the tire.Spencer told the jury in his opening statement earlier Monday that Boushie was the victim of “a freak accident that occurred in the course of an unimaginably scary situation.” He told jurors Boushie’s death wasn’t justified, but they must put themselves in Stanley’s shoes.“Is it unreasonable to fire warning shots when the intruders have tried to steal, taken a run at you with their vehicle, crashed into your vehicle – from Gerry’s perspective intentionally – almost run over your wife?” Spencer asked.“Is it reasonable to fire warning shots to get them to just leave? That’s what it comes down to in many ways.”Stanley was faced with intruders and didn’t have the luxury to wait for police, Spencer said.“This was not a justified death. This death is not justified legally or morally. It is never, never right to take somebody’s life with a gun. But that’s not what this case is about,” he argued.“This is really not a murder case at all. This is a case about what can go terribly wrong when you create a situation which is really of the nature of a home invasion. For farm people, your yard is your castle and that’s part of the story here.”Spencer said the young people who drove onto the Stanley farm aren’t on trial, but he also said they created a panic situation.“If they would have just stopped – stopped drinking, stopped drinking and driving, stopped breaking into people’s places, stop vandalizing stuff, stop crashing into things. Just walk away.”