In the era of awakenings, upheavals and revolutions: watch Turkey.

It has become a hugely ambitious country, bristling with self-belief. In a turbulent Middle East it believes it is the democratic role model. It eyes the role as spokesman for the region as a whole. When disputes need to be settled, it offers itself as the mediator. The State Minister and Deputy Prime Minister Cemil Cicek summed it up: "Everybody has to see Turkey's power."

Over Libya it is the country that the West watches more carefully than any other. For the moment, Turkey is supporting Nato's campaign whilst refraining from joining in any attacks on Gaddafi's ground forces. It is holding itself back, ready to step forward as the indispensable locator when the hour of negotiation approaches.

On the Libyan conflict it has flipped and flopped however. Early on, the Turkish Prime Minister Recep Tayyip Erdogan denounced any Western intervention as "absurd". He raised fears of a "second Iraq". Turkish officials seemed to lash out at what they portrayed as an oil grab by the West. They picked a fight with the French interior minister Claude Gueant who unwisely said the French President was leading a "crusade" to stop Gaddafi's barbarism. He didn't mean it of course in the historical sense but Turkish officials pounced on the tongue-slip.

That was then. Now Turkey is committing five or six vessels to police the arms embargo and is running Benghazi airport to co-ordinate humanitarian assistance.

Turkey wanted to disguise its hand, to see which way the battle flowed. Twenty thousand of its citizens work in Libya and it has lucrative contracts there. Commercial self-interest made it cautious.

The u-turn was driven by the realisation that the international community, including the Arab League, was determined that the killing of civilians had to stop.

Turkey had two positions. Firstly, it would not attack Gaddafi's forces directly. Secondly, it was fiercely opposed to a coalition, led by France, setting the agenda.

Its problem with France is simple. President Sarkozy is against Turkey joining the EU as a full member. Ankara feels insulted and it is easy to meet Turkish officials with a mouthful of rage against the French president.

So Turkey wanted the operation run under Nato, where it has a role in decision-making and drafting the rules of engagement. Its position is hard-headed. "We are one of the very few countries that is speaking to both sides," said one official. It waits for that moment when the mediator is summoned on to the field of play.

On the turmoil in the Arab world, Turkey has sold itself as the role-model. Early on it urged Hosni Mubarak to stand down. Many of the Egyptian demonstrators wanted Egypt to be like Turkey; secular yet certain of its Muslim identity but with free elections.

When the killings started in Syria, Prime Minister Erdogan was immediately on the phone. "I have made two calls to President Assad in the last three days and I have sent top intelligence official to Syria. I have called for a reformist approach."

It is all skilfully balanced; on the side of reform but keeping a hand in with the man in power.

Sometimes it seems Turkish officials are everywhere. Such as when the prime minister shows up in Baghdad. It is Turkish goods and companies that so far have conquered Iraq's markets. With the prime minister were 200 businessmen.

President Ahmadinejad of Iran may be isolated, but not with Turkey. Ankara has again positioned itself as the deal-maker. There is also the not-so-small matter of $10 billion in trade with Tehran.

Turkey has also helped shine its credentials in the Middle East with a major row with Israel over the interception of a boat heading for Gaza. Turkish citizens died in the incident.

So Turkey's sphere of influence widens but, even so, there are the problems.

Since 2005 it has been engaged in accession talks with the EU. For the moment they are going nowhere. President Sarkozy and Chancellor Merkel favour instead of membership "a privileged partnership". Turkey wants none of it and seethes with resentment.

Some - but not all - in the EU are wary. There are 24 million without work in Europe and the appetite for enlargement has dimmed. Not everyone is convinced that a Muslim country should be in the EU. It would be difficult to have Turkey join without its people being consulted.

Turkey knows this and asks the searching question: "Is the EU a Christian Club or is it the address of a community of civilisations? The current picture shows the EU is a Christian Club. This must be overcome." It touches a raw nerve. But plenty in Europe ask whether Turkey would accept becoming a community of civilisations.

You could sense the strains and tensions when recently Prime Minister Erdogan went to Germany, where two million people of Turkish origin live. He caused huge offence when he told an audience in Dusseldorf: "Our children must learn German but they must learn Turkish first." It was an open challenge to the German government which had been insisting that those who live in Germany must speak the language and integrate. The German chancellor opined that multiculturalism had failed because it led to separation.

There is, too, friction over Cyprus, and the disturbing detentions of reporters and writers. It forced the European Commission to warn Turkey over its democratic credibility.

And then there are the doubts as to how committed the ruling party is to secularism. Recently Ayse Sucu, who headed a woman's group, was squeezed out after suggesting women themselves should decide whether to cover their hair.

There is an ongoing struggle within Turkey which will demonstrate its commitment to tolerance. That, more than anything, will determine whether it is indeed a role model.

But Turkey is on a roll. Sometimes - irritated at being rebuffed - it contemplates abandoning its pursuit of EU membership. It survived the economic downturn and its growth is an enviable 5%. It may prefer to go it alone and, like the Ottomans, revel in newfound influence.

But when it comes to Libya, Turkey demands to be listened to. And the West needs Turkey on side.