Turkish Prime Minister Tayyip Erdogan attacked the French parliament on Tuesday for passing a discriminatory and racist bill which makes it illegal to deny the mass killing of Armenians by Ottoman Turks nearly a century ago was genocide.

With passions running high in Turkey on Monday's Senate vote, one newspaper denounced the French president as Satan Sarkozy and some politicians have already suggested dredging up France's own colonial history.

However, Erdogan appeared keen to avoid an immediate rupture with Paris, saying there was still hope that NATO ally France would correct its mistake and that any retaliatory measures would be held back, depending on French actions.

We will not allow anyone to gain political benefit at the expense of Turkey; the bill which was passed in France is clearly discriminatory, racist, Erdogan said.

We will adopt a rational and dignified stance, we will implement our measures step by step. Right now we are still in a period of patience, he told parliamentary deputies of his AK Party.

Encouraged by their success in Paris, the influential Armenian diaspora is expected to re-double its efforts in the United States, which like France is in a presidential election year, to have Washington call what happened a genocide.

Many Turks see the French bill, which the lower house of parliament also backed in December, as an insult to their nation, a travesty of history and an infringement on free speech.

As Erdogan spoke, a couple of hundred protesters gathered outside the French embassy in Ankara and consulate in Istanbul in peaceful demonstrations.

The bill now goes to President Nicolas Sarkozy to be ratified. Mostly Muslim Turkey accuses Sarkozy of trying to win the votes of 500,000 ethnic Armenians in France in the two-round presidential vote on April 22 and May 6.

Sarkozy's office said the law would come into effect within the next two weeks. The President of the Republic will promulgate the law withing the usual timeframe, that is two weeks, a source at the presidential office told Reuters.

In a letter sent to Erdogan on January 18 and made public on Tuesday, Sarkozy said the law did not target a particular state, and urged Ankara to take into account its common interests with France.

KEEP CALM

French Foreign Minister Alain Juppe, who was personally against the bill proposed by Sarkozy's party, said the new law was ill-timed, but called on Ankara to remain calm.

We need good relations with it and we need to get through this excessive phase, Juppe said on Canal+ television. We have very important economic and trade ties. I hope the reality of the situation will not be usurped by emotions.

Turkey, a member of NATO and the World Trade Organization, may be limited in its response by its international obligations. However, newspapers listed possible measures that Ankara might take against France.

These included recalling its ambassador from Paris and telling the French ambassador to go home, reducing diplomatic ties to charge d'affaires level, and closing Turkish airspace and waters to French military aircraft and vessels.

Speaking shortly before Monday's Senate vote, Erdogan said the issue of future official visits to France would be thrown into uncertainty if it passed the bill.

French firms stand to lose out in bids for defence contracts and other mega-projects such as nuclear power stations.

Turkey may also seek to press allegations that French actions in Algeria in the 1950s and 1960s during the North African country's independence struggle, amounted to genocide.

However, Armenian President Serzh Sarksyan sent a grateful letter to Sarkozy.

This is a historic day for the Armenians all over the world - in Armenia, in France, everywhere, he wrote. This is an unforgettable day, and it will be inscribed in gold into the centuries-long history of the Armenian and French peoples.

SATAN SARKOZY

Morning headlines in Turkish newspapers were anything but calm. A guillotine to free thought said Star, while Aksam described the French move as A guillotine to history.

Shame on France cried the Vatan daily. While Sozcu, a small newspaper that usually directs its scorn at Erdogan, found a new target with Satan Sarkozy.

In contrast, most French newspapers carried small stories of the Senate vote in their inside pages.

Ankara's mayor has spoken of renaming the road where the French embassy is located to Algeria Street and erecting a memorial to Algerian victims of French colonial oppression in front of the embassy.

When the lower house backed the bill in December, Ankara cancelled all economic, political and military meetings with Paris and briefly recalled its ambassador for consultations.

Sarkozy is expected to ratify the bill before parliament is suspended in February before the presidential election.

However, it could still be rejected if about 60 lawmakers agree to appeal the decision at France's highest court and this body considers the text unconstitutional. The Constitutional Council would have one month to make its decision.

Turkish President Abudullah Gul urged French lawmakers to apply to the council to quash the bill. They should not forget that this will leave a lasting mark on the Turkish people. If this (bill) becomes final, relations will certainly take a very different course, Gul said.

Relations between Ankara and Paris have been testy largely due to Sarkozy's opposition to Turkey's bid to join the EU, and the latest row further clouded Turkish relations with the bloc.

It will blur their ties with Europe Union, said Dorothée Schmid, head of the contemporary Turkey department at the Paris-based International Institute for Foreign Relations (IFRI).

Turkey cannot impose economic sanctions on France, given its membership of the World Trade Organization and its customs union accord with Europe, but French firms could lose out on state-to-state-contracts, notably in the defence sector.

France is Turkey's fifth biggest export market and sixth biggest supplier of imports of goods and services, and bilateral

trade was $13.5 billion in the first 10 months of last year.

Armenia, backed by many historians and parliaments, says about 1.5 million Christian Armenians were killed in what is now eastern Turkey during World War One in a deliberate policy of genocide ordered by the Ottoman government.

The Ottoman empire was dissolved after the end of the war, but Turkish governments and most Turks feel the charge of genocide is an insult to their nation. Ankara argues there was heavy loss of life on both sides during fighting in the area.

A French Muslim businessman said on Tuesday that he had set up a 1 million euro fund to pay for any fines imposed as a result of the new genocide law.

Property dealer Rachid Nekkaz already set up a similar fund to cover fines for women who wear Muslim niqabs and burkas despite laws banning them in France and Belgium.

Some ethnic Armenians in Turkey saw the French move as unhelpful. This only will provide more grounds to nationalism and reactions in Turkey, said Robert Koptas, editor of Agos, a Turkish-Armenian newspaper.

(Additional reporting By John Irish in Paris and Hasmik Mkrtchyan in Yerevan; Writing by Simon Cameron-Moore; editing by David Stamp)