The AKP is challenging the power of Turkey's army and courts
Turkey's parliament has approved all but one of 27 controversial changes to the constitution, which critics say could undermine the secular courts.
The main secular opposition accuses the ruling AK Party of trying to seize control of state institutions. The AKP's roots are in political Islam.
The AKP did not get a two-thirds majority, so the amendments will still have to go to a referendum.
The AKP says the reforms will help the country's application to join the EU.
The package was passed after a marathon four-day session.
But the AKP's attempt to make banning political parties more difficult was unexpectedly defeated on Tuesday.
The current constitution dates back to 1982, and was drafted after a military coup.
The government wants to restructure a judiciary which is frequently criticised by human rights groups.
The package includes limits on the jurisdiction of military courts. In addition, more judges would be appointed to the Constitutional Court and the powerful Higher Council of Judges and Prosecutors (HSYK) - with the president having a big role in their selection.
The main opposition CHP says it will challenge the package in the Constitutional Court - one of the institutions which would be most affected.
The AKP has clashed repeatedly with 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.