When the foreign troops left Iraq at the end of 2011, the country was relatively peaceful.
But the Americans' departure opened a door for Prime Minister Nouri al-Maliki — allowing him to give "way to his sectarian fears," and leading almost directly to the current crisis in the Middle East. That's according to Martin Smith, writer and producer for a new Frontline documentary called "The Rise of ISIS."
Smith says after the American troops left, Maliki, who's a Shiite, begins to sideline Sunnis.
"When [Maliki] sees Sunnis, he sees plots against him ... and he began a lot of activities that made things worse," he says.
One example of the activities Smith points to is when Maliki targeted the bodyguards of Sunni ministers in his cabinet. Finance minister Rfia al-Issawi, for example, found his bodyguards "kidnapped." Shortly after, the minister himself escaped to Anbar province and was "banished from the government," Smith says. "Everybody considered [the finance minister] a moderate."
The pressure the Maliki government was exerting on the Sunnis resulted in major demonstrations. Tens of thousands of Sunnis in various parts of Iraq gathered daily to protest Maliki and his government.
Then in April 2013, government forces clashed with protesters in the al-Hawija district in Kirkuk province.
"The Maliki forces responded with force," says Smith, "and that was one of several turning points."
Meanwhile ISIS was looking for recruits among the Sunni population. Smith says ISIS' existence wasn't Maliki's fault, but his shortcomings as a leader made it easier for them to gain strength.
"The Sunni tribes tried over and over again to find a role to play under the Shia-led government. They were promised during the Sunni Awakening that they would be integrated into the Iraqi security forces," Smith says.
But because very few of those promises fulfilled, some decided to join forces with the ISIS. Smith believes that sectarianism continues to divide Iraq today, as the group that today calls itself the Islamic State continues to take considerable territory across the country.
"These tensions have been there and will remain. Until Sunnis and Shia and Kurds can trust one another, Iraq as a unified state is a fiction," he says.