President Ahmet Necdet Sezer signed into law on Monday Turkey's new penal code, a vital part of its drive to join the European Union, the presidential web site said.
The European Commission recommended last week that the bloc open entry talks with Turkey, but one of its key conditions was enactment of the revised penal code.
The new code bolsters women's rights and individual freedoms and imposes tougher penalties against such crimes as rape and torture.
Last month, Prime Minister Tayyip Erdogan sparked a minor crisis in relations with the EU when he put the draft code on hold amid a row over government plans to outlaw adultery.
Turkey's parliament met in extraordinary session on September 26 to approve the penal code after the Commission had made clear it could not otherwise give a green light for entry talks.
Sezer, a staunch secularist, has in the past rejected some government-backed legislation, notably laws which he feared could boost the role of religion in Turkey. Erdogan's ruling party has its roots in political Islam.
EU leaders will have the final say on whether to open entry talks with Turkey when they meet in Brussels on December 17.