"To veto or not to veto?" That is the agonising question that has President Barack Obama pacing the battlements of the White House waiting to dodge the slings and arrows of outraged Aipac. Provoked by the latest demolition in East Jerusalem, no fewer than 120 countries have sponsored a UN resolution condemning Israeli settlement activity. Hillary Clinton has also condemned it as "illegitimate", but the resolution introduces precision by terming the settlements as "illegal".

In a country where "all politics is local", and in the face of the economic crisis, Obama could almost be forgiven for dropping the ball in the Middle East game. But his response to the current resolution could well determine whether there is any wind left in the sails of the peace flotilla he launched with his speeches in Egypt and Turkey directed at the Muslim world.

Every other member of the UN security council agrees that settlements are illegal, including Britain and France. The international court of justice has affirmed their illegality. The US once called them illegal, then termed them unhelpful, and currently regards them as "unhelpful" and "illegitimate". Under the road map of 2003, Israel agreed to stop them, but it has ignored the rest of the world and its best friend, the US, and continued to build. Even President Bill Clinton officially reduced the amount of US loan guarantees by the sum spent on settlements.

In the face of Binyamin Netanyahu's defiance, so far the US response, engineered by Dennis Ross – who seems to have frozen out the official peace negotiator, George Mitchell – has been to attempt to bribe Israel with billions of dollars, free jet fighters and a free "get out of the security council" card in the form of a veto. The handsome offer was for a temporary moratorium.

Washington's line is to ignore UN decisions and international law and say that it is up to the parties to negotiate such "permanent-status issues". The state department itself is clearer on the issues. After years of congressional votes, it still balks at moving the US embassy to Jerusalem (which hosts not a single foreign embassy) because, regardless of eventual negotiations, Israel does not have internationally recognised title to the city.

It is as if you have caught someone stealing your car and the police decide to overlook technical issues like the law and ownership and instead tell you to negotiate with the thief to get occasional access to the back seat.

In this week's security council debate on the resolution, deputy US ambassador Rosemary DiCarlo used theological nicety to explain Washington's difficulty in supporting a resolution that, on the face of it, reflects US official policy. "We believe that continued settlement expansion is corrosive – not only to peace efforts and the two-state solution – but to Israel's future itself. The fate of existing settlements is an issue that must be dealt with by the parties, along with the other permanent-status issues – but, like every US administration for decades, we do not accept the legitimacy of continued Israeli settlement activity."

However, she added: "Permanent-status issues can be resolved only through negotiations between the parties – and not by recourse to the security council. We therefore consistently oppose attempts to take these issues to this council and will continue to do so."

The US ambassador to the UN, Susan Rice, is usually tactfully absent during such debates, keeping her credibility by allowing deputies to intone the weaselly formulas that disguise the stark truth. Annexation and settlement building are illegal.

Of course, Obama has other problems, such as the economy and healthcare, and on the Middle East must face not only a rabidly pro-Israeli Republican party but also a majority of his own party that would sign up to a resolution declaring the moon to be made of blue cheese if the Israeli lobby demanded it.

Nonetheless, his credibility as president is at stake here. The Republicans do control the House of Representatives, and indeed the chair of the foreign affairs committee is now Ileana Ros-Lehtinen, who outflanks the Israeli government on the right. (She has been trying to de-fund UNRWA, the UN's agency that provides basic services in the occupied territories, even though the Israeli government, which would have to pay if the UN didn't, opposes her.) But Congress cannot control the US delegation to the UN.

It is surely time for Obama "to take arms against a sea of troubles, and by opposing end them". This week, a letter landed on the White House doormat from a phalanx of foreign policy and government professionals urging him to support the resolution. He should take their advice.

The public exasperation implied by support for the security council resolution sends a signal to Netanyahu that there are indeed consequences for ignoring the advice of your best friend, let alone breaking the law. It might make the Israeli prime minister more amenable, and it would certainly send a signal to the Israeli electorate that Netanyahu had terminally alienated the White House.

It would not alienate the American electorate, not even American Jews. Those who support Netanyahu tend to be those who think the president is a foreign-born crypto-Muslim anyway. It would bring cheer to the J-Street movement, whose peacenik views more closely reflect those of most American Jews than Likud does.

And it would do more than any other single act to demonstrate respect for international law and restore the credibility of American diplomacy.

Indeed, Obama could follow up and demand the IRS check on the tax deductibility of American "charities" and foundations that bankroll settlement building, including Irving Moskowitz, who recycles the proceeds of inner-city gambling in the US to buy and demolish property in East Jerusalem, such as the Shepherd Hotel, with the conscious aim of frustrating the declared policy of every US government since 1967. Some of the money, however, he sends as donations to politicians like Ileana Ros-Lehtinen.

• Comments on this article are set to remain open for 24 hours from the time of publication but may be closed overnight