Although one is tempted to put the disastrous rule of former Iraqi Prime Minister Nouri al-Maliki in the rearview mirror, we must study it and learn from his mistakes if Iraq's new leadership — with no small measure of U.S. assistance — is to arrest the vicious cycle of sectarian and internecine violence gripping the country.

For years, the al-Maliki government pushed Iraq to the brink of civil war by exploiting sectarian divisions for political advantage. With the departure of American troops in 2011, al-Maliki, backed increasingly by Shiite Iran, adopted policies that alienated large segments of the population. Those policies paved the way for the rise of extremist, terrorist Sunni groups like Islamic State and eroded whatever allegiance to the government existed among the Sunni-dominated thin green line charged with protecting the people: Thousands of Iraqi soldiers fled without a fight as the Islamic State made shocking advances across Iraq this summer.

The coming days and months are critical. Only an assertive U.S. stance that calls for an inclusive and independent Iraqi government can stop the cycle of sectarian bloodshed. With the introduction of a new prime minister-designate, Haider al-Abadi, Washington has an opportunity to ensure that all of Iraq's diverse political voices are embodied in a democratic political order. Iraq's diversity on the ground must be reflected in its government.

An important first step for al-Abadi must be to end Iran's ubiquitous meddling. For years, Iranian dissidents, the intelligence community and foreign policy analysts have warned of al-Maliki's worrisome pro-Tehran tilt. After spending years in exile in Iran, al-Maliki developed a dangerously close relationship with Qassem Soleimani, commander of Iran's Quds Force, charged with expanding Tehran's sphere of influence. Indeed, Iran moved to consolidate its influence in Iraq under al-Maliki by coercing the judiciary and Shiite blocs there to support a second term for their client, even though his faction lost the election in 2010. "Generals in Tehran" then assembled al-Maliki's Cabinet, as Ali Khedery, a former senior adviser to five U.S. ambassadors to Baghdad, aptly put it.

Al-Maliki returned the favor by showing no hesitation to massacre defenseless Iranian dissidents gathered in Iraqi camps Ashraf and Liberty. Repeated deadly and unprovoked attacks against members of the Mujahedeen-e-Khalq left more than 100 dead and thousands injured, helping Tehran in its quest to eliminate a pro-U.S., democratic opposition group.

With the help of Iran's Quds force, al-Maliki brutally repressed popular protests across Iraq that demanded basic rights for Iraq's Sunni and Kurdish minorities. He hunted down tribal leaders, made arrests and carried out executions, all with Tehran's complicity. That reversed the gains made in 2007, when Sunnis played the most crucial role in driving al-Qaida out of Iraq. It also demonstrated the kind of brazen sectarianism that gave rise to the Islamic State, which many U.S. analysts say represents a new, direct threat to U.S. interests.

The course of action now is clear: The U.S. must push for transition to a more inclusive government that would give voice to the Sunnis, tribes, moderate Shiites and other minorities.

In adopting a firm diplomatic policy, the U.S. will not only bolster its damaged reputation in the region, it will destroy Islamic State's momentum by ending Sunni alienation from Iraqi politics. Likewise, in advocating for new and inclusive leadership, Iran's reign of terror in Iraq will be greatly diminished. Tehran will no longer have a puppet to carry out its dirty work next door. It will also lose important leverage in its nuclear negotiations with the West.

The manner in which al-Abadi's new government deals with Iranian dissidents in Camp Liberty will be a litmus test for his attitude toward Tehran. If he deals with the dissidents in accordance with Iraq's commitment to the United Nations, international law and their human rights, he will give strong indication that the new government is serious about charting an independent path for Iraq, one that puts national interests above sectarian divides.

Former Pennsylvania Gov. Tom Ridge was the nation's first secretary of the Department of Homeland Security, from 2003 to 2005. Former Vermont Gov. Howard Dean was a 2004 Democratic presidential candidate.