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 said they heard one of their all-terrain vehicles start and thought it was being stolen.Stanley testified they ran toward the SUV. He kicked the tail light and his son Sheldon hit the windshield with a hammer.Stanley 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 worried 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 the grey Ford Escape when he was shot in the back of the head.Court has heard an SUV carrying Boushie, and five other people from the Red Pheasant First Nation, 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.”Under cross-examination Crown prosecutor Bill Burge asked what was going on inside the car just before the shooting.“Was he looking at you? Were you trying to scare him?” he asked.“No. I was trying to scare them all out of the yard,” Stanley replied.“Did you intentionally shoot this person?” asked Burge.“No I didn’t. I didn’t pull the trigger,” said Stanley.Stanley was the last witness for the defence. Chief Justice Martel Popescul excused the jury until Thursday at which time they’ll hear closing arguments and receive his instructions.“At that point I turn it over to you, and at that point you would be sequestered until your deliberations are concluded,” Popescul said.Several people holding “Justice for Colten” signs waited outside of court.Boushie’s cousin was distraught.“That was one of the hardest things I’ve ever seen and to have to sit there and endure,” said Jade Tootoosis.“All we want is justice for Colten.”Follow @BillGraveland on TwitterNote to readers: This is a corrected story. An earlier version referred to the victim as an Indigenous teen.