BAGHDAD, Iraq (CNN) -- Iraqi President Jalal Talabani has blasted the United States for the arrest Thursday of an Iranian and called for his immediate release.

Iraqi President Jalal Talabani says an Iranian detained by the U.S. was a civil servant on a trade mission.

The U.S. military said the detainee is a member of an elite Iranian unit that has been accused of training and equipping insurgents in Iraq, but Talabani said he is a civil servant who was on an official trade mission in Iraq's Kurdistan region.

The "letter of resentment" was dated Thursday and addressed to Ryan Crocker, U.S. ambassador to Iraq, and Gen. John Petraeus. Presumably, the Iraqi president was referring to U.S. Gen. David Petraeus, commander of multinational forces in Iraq.

Iraqi and Kurdish regional government representatives were aware of the man's presence, Talabani wrote.

As a result of the incident, Tehran threatened to close its border with the Kurdistan region unless the detainee, identified as Agay Mahmoody Farhadi, is released. Closing the border would cause "severe damage to markets and trade in the province on this blessed month," Talabani said, referring to Ramadan.

"Therefore, I express to you our outrage for these American forces arresting this Iranian civil official visitor without informing or cooperating with the government of the Kurdistan region, which means insult and disregard for its rights," he wrote. "I call for his release immediately in the interest of the Iraq Kurdistan region and the Iranian-Iraqi relations."

Don't Miss

The detainee belongs to Iran's Islamic Revolutionary Guards Corps-Quds Force, "a covert action arm of the Iranian government responsible for aiding lethal attacks against the Iraqi government and coalition forces," the U.S. military said.

The military said the man "has been involved in transporting improvised explosive devices and explosively formed penetrators into Iraq. Intelligence reports also indicate he was involved in the infiltration and training of foreign terrorists in Iraq."