ANKARA (Reuters) - Turkey dismissed 107 judges and prosecutors over alleged links to a failed coup in July last year, Turkish television reported on Friday, in the third major purge since President Tayyip Erdogan was granted sweeping new powers.

Turkey has now fired about 145,000 civil servants, security personnel and academics, local media reported. The number of ousted judges and prosecutors has reached 4,238.

Ankara has blamed the network of the U.S.-based cleric Fethullah Gulen for a coup attempt last July in which he has denied all involvement.

Detention warrants were issued for the dismissed judges and prosecutors, Turkish TV said. More than 40,000 were arrested in the aftermath of the failed putsch in which 240 people were killed, mostly civilians.

Turkey on Saturday expelled more than 3,900 people from the civil service and military as threats to national security, after a referendum in April which rights groups and some Western allies say brought the country, a NATO member and European Union candidate, closer to one-man rule.