He says Islamic State mostly uses Russian weapons, such as the Kalashnikov. But the jihadists have a few American guns, too. The militant group captured most of them from the Iraqi army.

The Kurds are in a somewhat similar situation. They have a lot of spare parts for Kalashnikov-type weapons, but few parts for American-made M-16 and AR-15 rifles. The United States introduced small arms into Iraq more than a decade ago, but Russian weapons like the AK-47 have been there a lot longer.

“The weapons I see the most are Russian,” Bakhtiar adds. “They were all made in the 1950s, like the machine guns. Eighty-five percent of the weapons are from Russia.”

He acknowledges that the ex-Soviet rifle is less accurate than its U.S.-made counterparts, but he still prefers the Kalashnikov. “The parts are very cheap and it is easily repaired,” he says. “It is a very practical weapon.”

He’s seen a lot of captured weapons, too. “Sometimes after air strikes, [Islamic State] leaves DShKs, artillery and mortars behind.”

When the Iraqi army in Mosul melted away, its soldiers left behind millions of dollars worth of weapons and hardware. The Sunni insurgents captured modern rifles, armored vehicles, tanks and even helicopters.

Islamic State now uses these weapons against the Peshmerga — who at first only had vintage Warsaw Pact weapons. Even then, the Kurds had to make deals with corrupt Iraqi army officers to keep the guns maintained. This began to change with a surge of foreign aid to Kurdish forces.

“You can’t compare the Peshmerga’s weapons with ISIS’s weapons,” Bakhtiar says. “ISIS has weapons from two countries — Iraq and Syria. They have very big, heavy weapons, but the Peshmerga doesn’t have the same equipment.”

The gunsmith doesn’t just handle repairs. By using cheap Chinese parts, he can create a weapon that a Peshmerga fighter will be happy with. He holds up what outwardly appears to be an M-4 carbine. Looking closer, one can see “M-16A4” stamped on the side of the magazine housing.

The M-4 is a shorter, lighter version of the M-16. The Peshmerga prefers light-weight rifles, he says. Bakhtiar will take an M-16, change the stock and hand-guard, and then shorten the barrel to make something approximating an M-4.

This particular example is a chop-shop job for a Peshmerga fighter. He doesn’t know where the fighter found the weapon, and he didn’t ask.

Converting M-16s into M-4s is something Bakhtiar does on customer request. The going rate for an M-4 in Kurdistan is around $4,000 to $6,000 — double that of an M-16. The price is higher during periods of heavy fighting.