The court rejected an opposition appeal to scrap all of the measures, and said the remaining elements would be put to a referendum as planned.

The court annulled changes which would curb the power of the judiciary and the army.

The ruling AKP says the reforms are necessary if Turkey is to join the EU.

It accuses the Constitutional Court of exceeding its authority.

But the nationalist opposition and senior judges are against measures they say would threaten the independence of the courts.

Turkey's highest courts - which see themselves as guardians of the secular values that were at the core of the political system established by Turkey's founding father, Mustafa Kemal Ataturk - have repeatedly clashed with the AKP over the issue.

Powerful judiciary

The latest development is a setback to the government's plans to amend the constitution, says the BBC's Jonathan Head in Istanbul.

The current constitution dates back to 1982, and was drafted after a military coup.

Among the articles annulled were two relating to how members of the Constitutional Court and another powerful judicial body are chosen.

The government had wanted to widen the selection of candidates, and give parliament and the president a bigger say.

The opposition parties, who had brought the challenges to the court, said this would have weakened the checks and balances in the political system.

But it could have been worse for the government, our correspondent adds: the Constitutional Court - a staunchly secular body which came close to dissolving the governing party just two years ago over its religious views - decided not to entirely block its proposed measures.

The package of reforms was passed by parliament after a marathon session in May, but not by the two-thirds majority that would have prevented the issue from going to a nationwide referendum.

The remaining reforms, which include stronger civil liberties and increasing civilian oversight of the military, will now be put to national vote in September.

The current package leaves a powerful judiciary in place, says our correspondent, and that is likely to remain assertive in its defence of Turkey's secular system against perceived threats from elected politicians.