Ever since he came to power in a military coup against the ancient King Idris, who was off having treatment in a Turkish spa in September 1969, the Libyan leader Colonel Gaddafi has been a master of mercurial manoeuvres.
It remains to be seen whether his latest flourish - an agreement to increase compensation for the bombing of the French UTA DC-10 in 1989 - represents another clever diplomatic stroke or is the sign of a weakening figure getting desperate to see off his enemies at any price.
Colonel Gaddafi defending deals
Certainly he could not afford to have France block a UN resolution formally lifting sanctions.
But Libya's position had previously been that a French court had decided compensation for the UTA bombing in 1999, and it would pay no more.
The court awarded a paltry $33m, compared to the $2.7 billion won for the Pan Am attack in direct negotiations with Libya by the US and Britain.
Now he is having to go on the offensive to justify what he has done in both deals. He has stepped up the rhetoric, as if to protect himself against internal criticism.
In a speech marking the 34th anniversary of his coup, he presented the French deal and the Lockerbie settlement which preceded it (together with an offer to pay compensation for the bombing of the La Belle nightclub in Berlin in 1986) as simply the defence of Libya by cash.
"God curse money!"
This is what he said: "God curse money! What is money for? With money we defend our country. I believe that the UTA and Lockerbie issues are behind us and we, God willing, have entered a new era."
The BBC Monitoring transcript records that there was applause at this statement.
He went on: "Through wisdom, Libyans' courage and the skill in managing the strategic battle, in managing this dangerous conflict with nuclear powers, money is not important. We have our dignity and we are not interested in money. We have reached a new era with the West.
He listed other ways in which Libya had "fought the liberation battle with courage." These ranged from supporting the Palestinians with arms, to supplying the Egyptians with fast rubber dinghies to cross the Suez Canal in their 1973 war with Israel, and to giving help to liberation movements all over Africa.
"We liberated South Africa, Zimbabwe, Guinea Bissau, Cap Verde and Angola," he declared. He did not mention his support for the IRA, which was substantial.
"Now we are reaping the fruits of our struggle. Africa is with us, peoples are with us and support us. Our voice is heard and respected," said the Libyan leader.
All that was different now, he suggested, was the means by which Libya and its cause was being defended.
It is a novel defence, and it is unclear whether it will convince Libyans who might privately be quite angered at the size of the settlements.
In return, of course, Libya will get UN sanctions, already in suspense, formally lifted, but Libya has not been able to wipe the slate clean yet. American sanctions remain for the time being.
Libya expert Professor Tim Niblock of Exeter University pointed to one reason for the Colonel's decisions: "There are signs that Colonel Gaddafi and those around him feel that things will go badly for regimes which do not make their peace with the United States."
Professor Niblock told News Online that, in the case of the UTA plane, there was an extra incentive. "Not only could France hold up the lifting of UN sanctions, it is in Libya's interest not to be seen selling out to the Americans over Lockerbie but to be making an agreement with Europeans as well. Gaddafi wants to have good relations with both the US and the EU."
In interests of the West
It has been in the interests of the West to draw the teeth of the Libyan tiger.
But, having seen what happened to Saddam Hussein, Colonel Gaddafi might well regard himself as lucky to have survived at all. It is unlikely that an attack on an American civilian airliner would these days result in anything less than violent regime change for those responsible.
Somehow, the Colonel escaped Saddam's fate. He was made to pay a financial price instead.
The United States was the most reluctant to make a deal and France was the most keen, with Britain somewhere in the middle as usual. But everyone agrees that Colonel Gaddafi has been put on notice and will know that any future terrorist actions by him will surely meet with a more severe response.
The Colonel's main problems from now on might well be with his own fellow citizens. A traveller who was in Libya a few months ago reported that he had not heard criticism of the Libyan Government made so openly before.
Such a comment does not mean that the end of Colonel Gaddafi is nigh. But it could be a sign that - even among Libyans - he has lost the prestige he has so earnestly sought.