By Jonathan Head
BBC News, Istanbul
MPs in Turkey are locked inside parliament in Ankara this week to vote on a package of amendments to the 1982 constitution.
Turkey's prime minister has doggedly pushed for changes to secular bastions
The amendments are being challenged by the three opposition parties, who argue they will give the government too much power over the judiciary.
The government says they are essential to bring Turkey in line with European norms, and to re-structure a judiciary which is frequently criticised by human rights groups.
Two thirds, or 367 of the 550 MPs, must vote for the amendments for them to pass. The governing AK Party has a majority, but not two-thirds.
If the amendments get more than 330 votes in favour, President Abdullah Gul can put them to a national referendum. The main opposition CHP says it will challenge this in the Constitutional Court - one of the institutions which would be most affected.
These are the most controversial proposals. 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.
The opposition and senior judges complain that the reforms would compromise the independence of the judiciary. But many legal scholars and the European Union say reform of the judiciary is essential.
The Constitutional Court
One of the most powerful arms of the judiciary, it came close to closing down the AKP in 2008.
The government wants to expand the Constitutional Court from 11 permanent and four substitute judges to a total of 17. At the moment the president chooses three and selects the others from a list drawn up by a committee of senior judges. Under the new proposals, parliament will select three members of the court, and the president selects the rest from a list of candidates drawn up from a wider number of sources. Critics believe this gives the president, who is currently AKP loyalist Abdullah Gul, more power over the Constitutional Court.
The Higher Council of Judges and Prosecutors
Another powerful body which has clashed with the AKP. Known in Turkey as the HSYK, it appoints and dismisses judges and prosecutors.
The government proposes expanding it from 7 to 21 members, selected by the president and the highest judicial bodies. Critics say the minister of justice will have too much power over the HSYK, because he acts as the chair. The government points out that this is no different from the current situation.
BANNING POLITICAL PARTIES
The Constitutional Court has banned political parties repeatedly over the past 50 years, a practice widely criticised inside and outside Turkey. The AKP wanted to make bans conditional on the approval of a parliamentary committee comprised of five members from each of the three biggest parties.
This proposal was unexpectedly rejected by just three votes on Monday after a number of AKP legislators voted against it. The government lost the support of the 20 Kurdish MPs, whose parties have been banned more often than any other group, because its proposal excluded them from the committee which would have the final say on a ban.
The government proposes allowing military personnel to be tried in civilian courts for the first time, for crimes against the state or the constitution. Top military commanders would be tried by the Supreme Court on such charges. A similar proposal last year was passed in parliament but struck down this year by the Constitutional Court.
There are several other proposals aimed at improving gender quality, individual rights and the rights of children.
WHY ARE THEY BEING CONTESTED SO FIERCELY?
There is a gulf of mistrust between the AKP and the two secular opposition parties, the CHP and MHP. The CHP believes the AKP has a hidden agenda to weaken the secular system and promote Islamic values. The AKP says it is challenging an authoritarian system, which restricts individual rights and compromises Turkey's candidacy for the European Union. Each side believes its vision for a more democratic Turkey is threatened by the other side.
The EU has broadly welcomed the reforms. So have many legal scholars. But some have accused the government of being too timid in its proposed reforms; others have accused the AKP of focusing only on those reforms where it has a direct self-interest.