BAGHDAD — Walk into almost any market in Iraq and the shelves are filled with goods from Iran — milk, yogurt, chicken. Turn on the television and channel after channel broadcasts programs sympathetic to Iran.
A new building goes up? It is likely that the cement and bricks came from Iran. And when bored young Iraqi men take pills to get high, the illicit drugs are likely to have been smuggled across the porous Iranian border.
And that's not even the half of it.
Across the country, Iranian-sponsored militias are hard at work establishing a corridor to move men and guns to proxy forces in Syria and Lebanon. And in the halls of power in Baghdad, even the most senior Iraqi Cabinet officials have been blessed, or bounced out, by Iran's leadership.
When the United States invaded Iraq 14 years ago to topple Saddam Hussein, it saw Iraq as a potential cornerstone of a democratic and Western-facing Middle East, and vast amounts of blood and treasure — about 4,500 U.S. lives lost, more than $1 trillion spent — were poured into the cause.
From Day 1, Iran saw something else: a chance to make a client state of Iraq, a former enemy against which it fought a war in the 1980s so brutal, with chemical weapons and trench warfare, that historians look to World War I for analogies. If it succeeded, Iraq would never again pose a threat, and it could serve as a jumping-off point to spread Iranian influence around the region.
In that contest, Iran won, and the United States lost.
Over the past three years, Americans have focused on the battle against the Islamic State in Iraq, returning more than 5,000 troops to the country and helping to force the militants out of Iraq's second-largest city, Mosul.
But Iran never lost sight of its mission: to dominate its neighbor so thoroughly that Iraq could never again endanger it militarily and to use the country to effectively control a corridor from Tehran to the Mediterranean.
"Iranian influence is dominant," said Hoshyar Zebari, who was ousted last year as finance minister because, he said, Iran distrusted his links to the United States. "It is paramount."
The country's dominance over Iraq has heightened sectarian tensions around the region, with Sunni states, and U.S. allies, like Saudi Arabia mobilizing to oppose Iranian expansionism. But Iraq is only part of Iran's expansion project; it has also used soft and hard power to extend its influence in Lebanon, Syria, Yemen and Afghanistan, and throughout the region.
Iran is a Shiite state, and Iraq, a Shiite majority country, was ruled by an elite Sunni minority before the U.S. invasion. The roots of the schism between Sunnis and Shiites, going back almost 1,400 years, lie in differences over the rightful leaders of Islam after the death of the Prophet Muhammad. But these days, it is about geopolitics as much as religion, with the divide expressed by different states that are adversaries, led by Saudi Arabia on one side and Iran on the other.
Iran's influence in Iraq is not just ascendant, but diverse, projecting into military, political, economic and cultural affairs.
At some border posts in the south, Iraqi sovereignty is an afterthought. Busloads of young militia recruits cross into Iran without so much as a document check. They receive military training and are then flown to Syria, where they fight under the command of Iranian officers in defense of the Syrian president, Bashar Assad.
Passing in the other direction, truck drivers pump Iranian products — food, household goods, illicit drugs — into what has become a vital and captive market.
Iran tips the scales to its favor in every area of commerce. In the city of Najaf, it even picks up the trash, after the provincial council there awarded a municipal contract to a private Iranian company. One member of the council, Zuhair al-Jibouri, resorted to a now-common Iraqi aphorism: "We import apples from Iran so we can give them away to Iranian pilgrims."
Politically, Iran has a large number of allies in Iraq's parliament who can help secure its goals. And its influence over the choice of interior minister, through a militia and political group the Iranians built up in the 1980s to oppose Saddam, has given it substantial control over that ministry and the federal police.
Perhaps most crucial, the parliament passed a law last year that effectively made the constellation of Shiite militias a permanent fixture of Iraq's security forces. This ensures Iraqi funding for the groups while effectively maintaining Iran's control over some of the most powerful units.
Now, with new parliamentary elections on the horizon, Shiite militias have begun organizing themselves politically for a contest that could secure even more dominance for Iran over Iraq's political system.
To gain advantage on the airwaves, new television channels set up with Iranian money and linked to Shiite militias broadcast news coverage portraying Iran as Iraq's protector and the United States as a devious interloper.
Partly in an effort to contain Iran, the United States has indicated that it will keep troops behind in Iraq after the battle against the Islamic State. U.S. diplomats have worked to emphasize the government security forces' role in the fighting and to shore up a prime minister, Haider al-Abadi, who has seemed more open to the United States than to Iran.
But after the United States' abrupt withdrawal of troops in 2011, U.S. constancy is still in question here — a broad failure of U.S. foreign policy, with responsibility shared across three administrations.
Iran has been playing a deeper game, parlaying extensive religious ties with Iraq's Shiite majority and a much wider network of local allies, as it makes the case that it is Iraq's only reliable defender.
Iran's great project in eastern Iraq may not look like much: a 15-mile stretch of dusty road, mostly gravel, through desert and scrub near the border in Diyala province.
But it is an important new leg of Iran's path through Iraq to Syria, and what it carries — Shiite militiamen, Iranian delegations, trade goods and military supplies — is its most valuable feature.
It is a piece of what analysts and Iranian officials say is Iran's most pressing ambition: to exploit the chaos of the region to project influence across Iraq and beyond. Eventually, analysts say, Iran could use the corridor, established on the ground through militias under its control, to ship weapons and supplies to proxies in Syria, where Iran is an important backer of Assad, and to Lebanon and its ally Hezbollah.
After the Islamic State swept across Diyala and neighboring areas in 2014, Iran made clearing the province, a diverse area of Sunnis and Shiites, a priority.
It marshaled a huge force of Shiite militias, many trained in Iran and advised on the ground by Iranian officials. After a quick victory, Iranians and their militia allies set about securing their next interests here: marginalizing the province's Sunni minority and securing a path to Syria. Iran has fought aggressively to keep its ally Assad in power in order to retain land access to its most important spinoff in the region, Hezbollah, the military and political force that dominates Lebanon and threatens Israel.
"Diyala is the passage to Syria and Lebanon, and this is very important to Iran," said Ali al-Daini, the Sunni chairman of the provincial council there.
Now, Diyala has become a showcase for how Iran views Shiite ascendancy as critical to its geopolitical goals.
"Iran is smarter than America," said Nijat al-Taie, a Sunni member of the provincial council and an outspoken critic of Iran. "They achieved their goals on the ground. America didn't protect Iraq. They just toppled the regime and handed the country over to Iran."
Particularly in southern Iraq, where the population is mostly Shiite, signs of Iranian influence are everywhere.
Iranian-backed militias are the defenders of the Shiite shrines in the cities of Najaf and Karbala that drive trade and tourism. In local councils, Iranian-backed political parties have solid majorities, and campaign materials stress relationships with Shiite saints and Iranian clerics.
The situation has fueled resentment. Iraqi Shiites share a faith with Iran, but they also hold close their other identities as Iraqis and Arabs.
"Iraq belongs to the Arab League, not to Iran," said Sheikh Fadhil al-Bidayri, a cleric at the religious seminary in Najaf. "Shiites are a majority in Iraq, but a minority in the world. As long as the Iranian government is controlling the Iraqi government, we don't have a chance."
Abadi, who took office in 2014 with the support of both the United States and Iran, has seemed more emboldened to push back against Iranian pressure since President Donald Trump took office.
He has promoted an ambitious project for a U.S. company to secure the highway from Baghdad to Amman, Jordan, which Iran has opposed. He has also begun discussing with the United States the terms of a deal to keep U.S. forces behind after the Islamic State is defeated.
Some are seeing a U.S. troop commitment as a chance to revisit the 2011 withdrawal.
Ryan C. Crocker, the U.S. ambassador in Iraq from 2007 to 2009, said that if the United States left again after the Islamic State was defeated, "it would be effectively just giving the Iranians a free rein."
But many Iraqis say the Iranians already have free rein. And while the Trump administration has indicated that it will pay closer attention to Iraq as a means to counter Iran, the question is whether it is too late.
"Iran is not going to sit silent and do nothing," said Sami al-Askari, a senior Shiite politician who has good relationships with both the Iranians and Americans. "They have many means. Frankly, the Americans can't do anything."