The European Commission and EU national governments have pressed hard for the agreement, arguing that it is vital to promote stability and prosperity in Turkey, one of the Islamic world's leading practitioners of secular politics. But many MEPs, particularly the Socialists, were highly critical of Turkey's treatment of its ethnic Kurdish minority and of laws that curbed freedom of speech in relation to Kurdish issues.
Turkey's Prime Minister, Tansu Ciller, has spent months lobbying for the customs union, warning EU leaders that if the European Parliament rejected the accord it would trigger a radical pro-Islamic, anti-European mood in Turkey. By the same token, with the parliament expected now to ratify the agreement, Mrs Ciller and her conservative True Path Party may receive an important boost in Turkey's 24 December parliamentary elections.
Mrs Ciller's government took several steps this year to convince MEPs that it was serious about political reform. In July it steered a set of amendments to the 1982 military-era constitution through the Turkish parliament, increasing the scope for popular participation in politics.
In October the Turkish court of appeals ordered the release of two Kurdish MPs imprisoned for advocating political and cultural rights for Kurds. However, prison sentences on four other Kurdish MPs were upheld.
The government also liberalised Article 8 of the anti-terrorism law, which had been used to jail more than 100 writers and intellectuals who spoke their minds on Kurdish matters. Last Tuesday Mrs Ciller even told a German television interviewer that she would soon consider lifting emergency rule in south-eastern Turkey, where the armed forces have fought Kurdish guerrillas for the last 11 years.
The customs union is designed to give Turkey the closest relationship with the EU short of full membership.