TIKRIT, Iraq — Iraqi insurgents and sectarian militias are funding their deadly activities by muscling in on Mafia-style rackets involving everything from real estate and oil to cement and soft drinks, U.S. commanders say.

U.S. diplomats and senior Iraqi officials have repeatedly singled out corruption as one of the greatest obstacles to stability in Iraq. But until recently, commanders acknowledge, they knew little about the criminal dealings they say sustain militant groups across the country.

"If you think that the majority of money is coming from outside the country to fund the insurgency, you'd be wrong," said Army Lt. Col. Eric Welsh, commander of the 2nd Battalion, 7th Cavalry Regiment, in the northern city of Mosul.

"I think a majority is being done right here . . . under the disguise of legitimate storefront operations."

Army Maj. Gen. Benjamin Mixon, who is wrapping up 15 months as commander of U.S. forces in northern Iraq, said shutting down the networks that finance the insurgency will be a growing priority as U.S. forces seek to consolidate recent gains against Sunni Arab extremists in Mosul, Baqubah and other cities.

An internal U.S. Embassy assessment leaked to the media in August said endemic corruption was crippling the government and providing a major source of funding to insurgent groups and sectarian militias.

Prime Minister Nouri Maliki has described the fight against corruption as Iraq's "second war."

"We can't win this thing with a bullet. We can't win it by killing everybody," Mixon said. "We have got to attack the insurgency from what source it comes from. Part of that is the financing."

The U.S. has long focused on kidnapping rings in Iraq. But commanders say insurgents have many other ways of strong-arming the money they need to buy weapons, build bombs, support fighters and pay their families.

Recent U.S. and Iraqi raids targeting financiers of insurgents in the northern city of Mosul have uncovered a criminal network involving kickbacks, overbilling and illegal sales, officials say, that has pumped millions into Sunni insurgent groups such as Al Qaeda in Iraq.

In Mosul alone, illegal real estate deals, in which government property is sold to unsuspecting buyers, have generated $40 million to $60 million for the insurgency in the last couple of years, a source told U.S. forces. Black-market sales of gasoline and propane in Nineveh province, of which Mosul is the capital, are believed to generate an additional $1 million a month.

Such rackets are a mainstay of armed factions across Iraq, U.S. and Iraqi officials say.

Sunni and Shiite Muslim militias have infiltrated every node in the production, processing, transfer, sale and export of oil, the major source of government revenue, said Judge Radhi Radhi, who recently resigned as head of Iraq's government corruption watchdog agency and sought asylum in the United States. He cited repeated threats to his life while he worked for the Commission on Public Integrity, which has seen at least 31 employees assassinated.

"This has resulted in the Ministry of Oil effectively financing terrorism through these militias," Radhi told the U.S. House Committee on Oversight and Government Reform at an Oct. 4 hearing on Iraqi corruption.

Sunni extremists, who last year declared their own Islamic caliphate headquartered in Baqubah, extort drivers and take a portion of the harvests and goods transported through the areas they control as "taxes," U.S. commanders say.

In Baghdad, Sunni and Shiite militias have chased thousands of people of the opposite sect from their homes, which they then rent out to displaced families of their own sect. They also take kickbacks from the men and boys who line up in front of gasoline stations with jerrycans of fuel to sell to those who don't want to wait for hours in line to buy their gasoline legally.

U.S. commanders even suspect that militants may have tapped into American reconstruction efforts, by extorting money from contractors and recipients of business grants from the Army. Before they left Iraq in September, soldiers of the 2nd Battalion, 3rd Infantry Regiment, gave out grants of less than $2,500 to revitalize business in the Sunni-dominated district of Dora in Baghdad.

"No sooner do we get word out that we have money for [grants] . . . then we get word back that Al Qaeda is going to be putting people forward to get those to fund their business," said Maj. Scott Green, the battalion's executive officer.

Iraq developed a flourishing black-market economy to counter the United Nations embargo after the 1991 Persian Gulf War, and it did not take insurgents long to realize this was a quick and untraceable way to generate and transfer funds. White-collar criminals in Mosul are forced to pay a cut to insurgents, whose causes they may or may not support, Welsh said.