If you know how to square a circle, the White House and 10 Downing Street would be delighted to hear from you. The deterioration of the security situation in Iraq in the past few months has created a difficult and disturbing dilemma for both George Bush and Tony Blair. It is not much easier for the rest of us, whether we supported or opposed the war.
We know that to pull out American and other coalition forces either now or in the next few months would condemn Iraq to anarchy, civil war and a complete breakdown of law and order. The new Iraqi government remains painfully weak; its army and security forces are few in number. They are only partially trained and have uncertain loyalties.
However, despite the presence of American forces, the insurgency has grown. Significant parts of central Iraq, including several towns and cities, are controlled by disparate groups united only in their opposition to the Americans and to the Iraqi government in Baghdad.
Even in the capital, the highly protected Green Zone, home to the central government, has come under rocket attack. Kidnapping and hostage-taking are rife, and as rebellion is suppressed in one locality it breaks out in another. Over the past few days the Americans, with support from Iraqi troops, have embarked on a major strategy to win back control of towns and districts from the insurgents - to try and ensure that the promised elections can go ahead with some credibility early next year. This campaign might have some success but few doubt that it is going to take months, and could take years.
The presence of Western troops not only gives some opportunity for the insurgents to be beaten, they also have another important role. If they were to depart prematurely, it is by no means certain that the country would hang together as a single state. The Kurds in the north of Iraq are enjoying considerable self-government but still yearn for independence.
The three southern provinces around Basra, which contain more than 80 per cent of the country's oilfields, chafe at Baghdad's control and only last week assumed - unilaterally - greater autonomy. The Iranians, for their own reasons, will be happy to foment any discontent that could lead to a fragmented Iraq. While formal secession of various regions remains unlikely, Iraq could easily become a failed state like Somalia or Afghanistan, with no effective central government for many years.
So, American, British and other coalition forces prevent the country's collapse into anarchy and provide the government of Prime Minister Iyad Allawi with time and opportunity to build up and train a new Iraqi army and police force that can take over, in due course, the provision of internal security. The problem is that it is the presence of these same American forces that may be becoming the main recruiting agents for the insurgents, the hostage-takers and the terrorists. The Stars and Stripes are a constant reminder that Iraq remains, de facto, an occupied country, that President Bush, and not their own Prime Minister, is the real power in the land.
It is reasonable to assume that most Iraqis were, and remain, delighted that Saddam Hussein has gone. They know that would not have happened but for the American invasion of their country. But gratitude is a scarce commodity in international affairs and, for all practical purposes, unknown in the Middle East. Iraqis assume that the Americans went to war not out of any sentimental desire to restore the liberties of the Iraqi people but to serve their own national interests. In the same way, as both Iraqis and Arabs, they have been taught for many years to loathe the Americans and the West, and to see it as vital to their own national interest to be free of foreign control.
That is why when the terrorists detonate a car bomb in Baghdad the average Iraqi appears to blame the Americans and not the perpetrators. That is why when a US helicopter gunship attacks an insurgent stronghold Iraqis identify more with the Iraqis who have been killed than with the Americans who are killing them in the name of Iraqi freedom.
There is a powerful argument that the best contribution the United States could make to defeating the insurgency and the terrorists would be to announce that it was withdrawing its forces from Iraq, and transferring full control and authority to the Iraqi government. As the Americans left, the whole dimension of foreign occupation would leave with them. Iraq might be condemned to vicious civil war but it would then be a domestic tragedy and not an international crisis.
It is an approach that cannot be dismissed out of hand but it is, at best, premature. It would condemn the Iraqi people to years of internal bloodshed; and would make the country a dangerous vacuum at the heart of the Middle East; a haven for terrorism, criminality and warlordism - far more dangerous to international peace than Afghanistan under the Taliban ever was.
Nor would setting a time limit for the US presence, say a year or 18 months, be any more worthwhile. Such a limit would be arbitrary, as we have no real knowledge, at the present time, as to when the Iraqi government and its security forces will be ready to take over full control. There is a way in which the circle can be squared; by which the US can help deliver security and stability without its own presence being a constant source of new recruits for the insurgency.
It would require Washington to transfer full responsibility to the United Nations, with American forces continuing as the main troop presence but with blue helmets and under UN authority. The genuine internationalisation of the foreign military presence would provide the Iraqi government with the military help that it needs but in a form that provided legitimacy and which would be seen as far more acceptable to Iraqis.
I have to confess that I do not see the slightest prospect of Bush considering such a change, and I doubt if John Kerry would be any more willing or able to deliver. But whoever becomes President will have to recognise that the alternative could cost far more American and Iraqi lives, and suck the US into Iraq for years to come - with little certainty of either stability or democracy in that unhappy country.
Sir Malcolm Rifkind is a Conservative former foreign secretary