ANKARA (AFP) - Turkey's top court on Thursday annulled a law allowing women to wear Islamic headscarves in universities on grounds it violates secularism, in a major blow for the prime minister and his Islamist-rooted party. In a brief statement after a seven-hour session, the 11-judge tribunal said it scrapped the law because it ran counter to constitutional provisions which say Turkey is a secular republic and that this principle is unalterable. The headscarf amendment, pushed through by the ruling Justice and Development Party (AKP), was cited by the country's chief prosecutor as a key piece of evidence in his pending bid to outlaw the party on charges that it is covertly seeking to replace the secular order with an Islamist regime. The ruling is largely seen as an indication that the Constitutional Court will also go against the AKP when it rules on whether to ban it and bar 71 party officials, among them Prime Minister Recep Tayyip Erdogan and President Abdullah Gul, from politics. The AKP, the moderate offshoot of a banned Islamist movement, pushed the amendment through parliament in February despite fierce objections that the change was a threat to the strict separation of state and religion. The AKP argued that the headscarf ban - imposed after a 1980 military coup - violates freedom of conscience and the right to education, but the main Opposition party immediately asked the Constitutional Court to abolish the law on the grounds that it was an affront to the secular system. The Constitutional Court has in the past twice ruled against moves to lift the on-campus ban on the headscarf. The ban has been upheld by the Council of State, Turkey's top administrative court, as well as the European Court of Human Rights. Hardline secularists - among them the army, the judiciary and academics - see the headscarf as a symbol of defiance against secularism, a basic tenet of the 84-year-old republic. They say that easing the restriction in universities will put pressure on women to cover up and pave the way for the lifting of a similar ban in high schools and government offices. The AKP rejects charges of being anti-secular and says that it has disowned its Islamist roots and embraced Turkey's bid to join the European Union. But it also maintains that rigid interpretations of secularism in Turkey breach religious freedoms.