Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

MUNICH — Iran and the U.S. exchanged angry letters during the recent confrontation that followed the U.S. drone strike that killed Iranian general Qassem Soleimani and the two sides came "very close to the brink," Iran's Foreign Minister Mohammad Javad Zarif told NBC News.

In an exclusive interview with NBC's Chief Foreign Correspondent Richard Engel, Zarif said relations remained tense after the January showdown and blamed President Donald Trump for pursuing a misguided policy toward Iran.

"It's unfortunate that the United States, based on misinformation, based on ignorance and arrogance, combined on a course that has brought the region very close to the brink," Zarif said. "We were very close to a war."

Zarif alleged that Secretary of State Mike Pompeo had written an "extremely inappropriate letter to Iran" at the height of the crisis in January and that his government responded with a strongly worded reply.

Pompeo's letter contained "threats," Zarif said, but he said he would not repeat what was written as it was beneath him. "Let him say what he put in that letter."

Zarif said the response from the Iran's Foreign Ministry was "not as impolite as his letter. "

The State Department could not be immediately reached for comment.

NBC News was able to review a copy of the Iranian Foreign Ministry's response to Pompeo's letter.

The Iranian foreign minister, speaking on the sidelines of an annual security conference in Munich, acknowledged that the tone of communication between the two governments had deteriorated.

"It didn't used to be this way," Zarif said, citing negotiations during the Obama administration in which he frequently spoke to then-Secretary of State John Kerry.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"I'm still the same foreign minister that dealt with John Kerry in a respectable way."

Zarif blamed the U.S. administration for triggering the crisis and said that it was up to Trump to pull back.

Asked about the risk of an inadvertent war, Zarif said, "Well, the United States hit at the wrong place, at the wrong time, and these are the consequences and we can't control the consequences, nor can the United States. I mean, people are responsible for the consequences of their actions and I think people who initiated this, need to walk back."

After Soleimani and the commander of an Iranian-backed militia in Iraq was killed in the U.S. drone strike at Baghdad airport, Iran retaliated on Jan. 8 by firing ballistic missiles at two bases housing U.S. troops in Iraq. Zarif said the missile assault was meant to send a message.

"We wanted to show to the United States that they could not bully Iran. Actions against Iran will have repercussions, but the intention was not to kill anybody," Zarif said. "The intention was to send a message, a very clear message to the United States, that if they kill Iranians, we will hit back."

No U.S. troops were killed in the attack but the Pentagon said on Monday that more than 100 service members suffered traumatic brain injuries from the missile barrage.

The Trump administration said the strike against Soleimani was justified because of what it said was a growing threat posed to U.S. personnel in the region by Iran and its proxies, especially after an American contractor was killed in a rocket attack in northern Iraq that Washington blamed on an Iranian-backed militia.

Zarif denied that Iran had control over Shiite militias in Iraq or the Hezbollah militia in Lebanon, which Western and Arab governments believe are clearly directed by the Tehran regime. Before Soleimani was killed in a U.S. drone strike in Baghdad, the head of the Revolutionary Guard Quds force was trying to defuse tensions and persuade the militias in Iraq not to take military action, Zarif said.

Soleimani was working at "containing people from engaging in actual military operations against anybody," Zarif said. "This was his job. This was what he was trying to do, to contain the situation. "

Zarif also acknowledged that Iran is not able to extract information from the black box from the Ukrainian airliner that was shot down by Iranian forces on Jan. 8, but said that Tehran will not hand over the box to outside governments.

Zarif defended Iran's decision not to hand over the black box from the Boeing-manufactured aircraft, which Iran says it shot down. Zarif called the incident a tragedy and noted that most of the 176 passengers killed had Iranian passports and relatives in Iran.

Under international aviation rules, Iran had the right to lead the investigation into the downing of the airliner, Zarif said. But he said Iran needed software, cables and additional expertise from the U.S. or other Western countries to be able to decipher the information in the black box.

"We have asked for help, why haven't the United States helped us? This is a humanitarian issue. Why haven't they given us the software? Why haven't they given us the expertise?" Zarif said.

"There are still a lot of unknowns. That's why we want more than anybody else to know what is in the black box, to know what actually happened."

For the moment, "it's just sitting there," Zarif said of the black box.

NBC's Engel asked Zarif, "Right now as we're sitting here , nobody is working on it? Nobody's trying to decipher this?"

And Zarif answered, "No, no. we will not touch the black box without the presence of all interested parties."

In a meeting earlier with Zarif in Munich, Canadian Prime Minister Justin Trudeau said he had "impressed upon" Iran's foreign minister that a complete and independent investigation into the shooting down of the Ukrainian passenger plane had to be carried out.