Slideshow ( 2 images )

ANKARA (Reuters) - A Turkish filmmaker was convicted on Friday of membership of a terrorist group for a feature film that portrayed President Tayyip Erdogan having a gun pointed at his head as his family lay dead all around him, the state news agency said.

Ali Avci was arrested last year after the release of a trailer for his film “Awakening”, based on a failed military putsch in 2016 in which more than 250 people were killed.

The trailer caused public uproar with sequences showing Erdogan’s family, including his son-in-law, Finance Minister Berat Albayrak, shot dead, and an army officer pointing a gun at the back of the president’s head as he prayed.

An Istanbul court sentenced Avci to 6 years and three months in jail for belonging to the network of U.S.-based Muslim cleric Fethullah Gulen, deemed a terrorist organization by Turkey. Gulen denies Turkey’s accusation that he masterminded the coup attempt.

The court said Avci had been carrying out “public perception management in line with the core goals of the terrorist organization” through his movie.

Avci denied the charges and said Erdogan himself had repeatedly said he was the target of the failed putsch, which included air strikes on the presidential palace in Ankara, although Erdogan was absent at the time.

“If I was trying to make terrorist propaganda, I would have shown Erdogan making plans to flee, instead of the praying scene,” Avci told the court.

More than 50,000 people have been jailed pending trial and 150,000 state workers including teachers, judges and soldiers have been suspended or dismissed after the coup attempt.