Terrorists – who tried to kill everyone on a plane by using their gay brother to carry a bomb – have been found guilty of conspiring to prepare or plan a terrorist act.

And the judge said that they targeted their brother because being gay brought “shame” to the family.

Related: Christian college president explains why LGBTQ people are just like ISIS

Investigators believe that Khaled Khayat and Mahmoud Khayat took a bomb filled with poisonous gas that they received from their older brother Tarek Khayat and put it in the luggage of their gay brother Amer Khayat before his Etihad flight from Sydney to Abu Dhabi in July 2017.

The bomb was hidden in a meat grinder, and it would have made it onto the plane if the bag wasn’t found to be overweight at Sydney Airport. When the attendant told Amer to remove some items, Khaled took the meat grinder out of the suitcase because he was worried about getting caught.

But they were caught and convicted at the New South Wales Supreme Court. And, in the meantime, Amer was held in a Lebanese prison for two years before being found not guilty of involvement in the plot by a military court in September.

Justice Christine Adamson sentenced Khaled to 40 years in prison and Mahmoud to 36 years.

She said that the brothers were “not particularly close to Amer.”

“Neither offender was particularly close to Amer, although each said he loved him as a brother and spoke to him when he saw him,” she said.