The U.S. is supposed to be leaving Iraq. But the Obama administration is desperately lobbying Baghdad to keep American troops in place, which would turn Iraq into yet another costly U.S. military dependent. Washington should bring home America’s troops.

The Iraq operation has been a tragic fiasco. Washington invaded to seize non-existent weapons of mass destruction (WMDs). American forces turned the country into a charnel house, killing hundreds of thousands and forcing millions to flee.

The war served as a potent recruiting tool for terrorists, leading to creation of an al-Qaida offshoot in Iraq. Washington transferred the forms of democracy without the larger culture of liberty. U.S. intervention empowered Iran.

Yet President Barack Obama wants American forces to say in Iraq. Washington would inevitably end up meddling in Baghdad’s domestic affairs and defending it in foreign matters.

A continued troop presence might give the illusion of political influence. But America’s influence was limited even when Washington formally occupied Iraq. Moreover, keeping U.S. troops on station would inflame nationalist sentiments against Washington.

Even Prime Minister Nouri al-Maliki referred to the end of American combat operations as Iraq’s “liberation.” Cleric Moktada al-Sadr vehemently opposes a continued U.S. presence and threatened to treat U.S. personnel “as a tyrannical occupier that must be resisted by military means.”

American forces, which remain active against Iraqi insurgents on the ground and in the air, have been suffering increasing attacks. Thankfully, no Americans were killed in August, for the first time since the invasion. However, that respite likely will be temporary if the U.S. stays.

The administration blames Iran for arming Iraqi radicals. If true, such action should surprise no one. After all, the U.S. invaded Tehran’s neighbor, sought permanent bases for use against Iran, and threatened military action against Iranian nuclear facilities.

Tehran would be foolish not to intervene in Iraqi affairs. Vice President Tareq al-Hashemi, a Sunni, contended that an American withdrawal would calm “the concerns of neighboring countries that feel threatened,” namely Iran.

A U.S. garrison, it also is argued, could help defend Iraq. Of course, by wrecking the Iraqi state, disbanding the Iraq military, and triggering widespread civil conflict, Washington’s invasion did impair Baghdad’s ability to defend itself. However, Iraq is building up its forces, including buying sophisticated weapons. And no neighbor is threatening to invade.

Some analysts point to Iran, but Tehran would have nothing to gain by attacking a nation with which it shares sizable religious, cultural, economic, and political ties. Iran already enjoys significant influence in Iraq. War is the one action Iran could take which would guarantee a rupture in the relationship.

Could Iraq become an Iranian satellite? While most Iraqis value their relationship with Iran, they evidence no desire to be swallowed by their larger neighbor. Baghdad will act on its interests, including preserving Iraq’s independence, whether or not there are U.S. troops on Iraqi soil. In contrast, if American forces stay, they will remain the focus of nationalist ire, not Iran.

The administration’s fallback position may be to keep a more limited number of American forces to train Iraqi personnel. Other possible roles include combating terrorism and gathering intelligence.

Defense Secretary Leon Panetta recently talked about keeping 3,000 to 4,000 (out of today’s 45,000) military personnel on station for such duties. However, a formal U.S. military presence is not required to render such assistance.

For most training, Iraq could directly hire civilian contractors without involving Washington. Or Baghdad could look for help from allied European states which do not pose such a big terrorist target in the Middle East.

Other objectives require few personnel on the ground and most duties could be handled by civilians, whether CIA or other. Instead of filling its Vatican-sized embassy in Baghdad, the U.S. should be shrinking America’s footprint in Iraq.

What will Baghdad decide? Secretary Panetta declared last month: “My view is that they finally did say, ‘Yes.’ ” But Prime Minister Maliki later responded: “The agreement on the withdrawal of American forces will be implemented on schedule by the end of the year, and there will not be any bases for U.S. forces here.”

Iraq is ending like most wars — far costlier in blood and treasure than expected. The U.S. should not have invaded Iraq. Although President Obama can’t undo the ill effects of the war, he can avoid the costs of a permanent occupation.

America’s job in Mesopotamia is done. The U.S. should withdraw all of its troops by the end of the year, bringing Washington’s misbegotten Iraqi adventure to a close.