Imam Mohamed Ali Elahi at a news conference last month.

Weeks after criticizing a U.S. drone strike that killed Iran's top terror mastermind, U.S. Customs officials questioned a Detroit-area imam about his support for the Iranian regime.

Mohamed Ali Elahi described the Feb. 6 encounter, which took place as he got off a flight from Seoul, South Korea at Detroit's Metropolitan Airport, on his Facebook page.

"My sad and bad experience at the airport today," he wrote.

Approximately 10 officers greeted him, with two asking him to be questioned and have his phone searched.

"I was not told what they were looking for, while checking my cellphone which carries my thousands of emails, WhatsApp, Telegram, Twitter and text messages, but if the purpose was to scan all the information, it would take more than ten minutes!" Elahi wrote. "One of the officers was interested to know my opinion on killing of General [Qasem] Sol[e]imani in Iraq, something I had already explained in my public letter to the president following the assassination!

"I felt so sad and heartbroken not for myself but for a country I love!"

The letter he referred to attacked President Trump for how he has spoken about Barack Obama and for turning his back on the Iran nuclear deal, among other things.

"You may see Soleimani as a terrorist but now tens of millions of Iraqis and Iranians marching behind his coffin, are honoring him as a charismatic leader, and collectively condemning your action and they categorize it as act of terrorism. So, I can see a lot that you lost out of this killing and wonder if you accomplished anything!" Elahi wrote.

Elahi condemned Soleimani's killing during a press conference held last month at his mosque, the Islamic House of Wisdom.

He said he is a naturalized U.S. citizen and has lived here for almost 30 years, arriving in the U.S. in 1991.

Before coming to America, Elahi ran the Iranian Navy's Head Political Ideological Bureau, a 1986 CIA report said. The late Ayatollah Ruhollah Khomeini appointed Elahi to that position in 1982, and he served in that post for five years.

Mohamed Ali Elahi, center, wearing glasses, appears with Iran's Ayatollah Khomeini in an undated photograph likely from the early 1980s.

The bureau was responsible for indoctrinating Iranian sailors to hate America and for enforcing Islamic norms. Before the revolution, many Iranian navy personnel trained in the United States and had positive feelings about America. Elahi's bureau reported to Khomeini's central staff, a 1987 Rand Corporation report noted , and was responsible for implementing the ayatollah's directives. This office was tasked with spying on naval personnel and rooting out dissenters.

Stories over the years in the Detroit Free Press and other local Detroit news outlets glossed over Elahi's work in the Iranian navy, saying he "taught religious classes in Iran's Navy." Elahi's official biography on the Islamic House of Wisdom's website also minimizes his role, saying, "Imam Elahi was appointed as an Islamic ethics teacher at the Iranian Naval Academy."

Despite that history, and his open expression of grief over Soleimani's death, Elahi expressed surprise that he drew law enforcement scrutiny:

"Is this how a faith servant, an ambassador of peace, a promoter of dialogue, a person whose life is dedicated to modesty, moderation, and call against extremism, terrorism and injustice, treated after 12 hours of flight and a week of restless outreach and hard work?"

Customs and Border Protection officers asked Elahi about references on his mosque's website to the 1979 Islamic Revolution in Iran. A 2014 post describes a celebration of the 35th anniversary of the 1979 Islamic Revolution that brought the ayatollah to power. Elahi praised Ayatollah Khomeini as "an exceptional religious authority who combined religion and reason, morality and modernization, purification and civilization," the post said.

A 2010 post shows that the Islamic House of Wisdom held memorial prayers to commemorate the anniversary of Khomeini's 1989 death and to condemn Israel's "criminal attack on the Gaza Aid Flotilla."

A 2013 post includes a biography of Iran's Supreme Leader Ayatollah Ali Khamenei and recommends his writings.

Elahi also met with Hizballah spiritual adviser Ayatollah Mohammad Hussein Fadlallah, and in 2010 mourned the leader of Iran's top terrorist proxy as a "great scholar." Fadlallah advocated suicide bombings in the 1980s during the Lebanese civil war.

Elahi has continued to have contact with high-level Iranian officials while working as an imam in Dearborn. Elahi has denied being Iranian agent.

"When I took the American citizenship and took the vows associated with loyalty to this country, I meant it. So I'm not [an] ambassador of Iran or any other country," Elahi told CBN News in 2006.

During a March 2017 trip to Iran, Elahi met with former Iranian President Mohammad Khatami. They had a "friendly conversation" about Khatami's eight years as president and discussed his memories of Ayatollah Ruhollah Khomeini.

Elahi also met with current President Hassan Rouhani in 2014 as part of a delegation of American Muslim leaders. He met Rouhani's predecessor Mahmoud Ahmadinejad during his 2010 visit to the U.S. in a similar setting with American Muslim leaders in New York.

He hasn't left Iranian regime propaganda far behind either, appearing on its Press TV propaganda channel numerous times.

Daniel Pipes, founder and president of the Middle East Forum, first wrote about Elahi in 1993, saying Elahi came to the United States in 1991 on a four-month visa. He allegedly used that access to inspect Hizballah operations and deepen Tehran's influence among Shiites in America. In 1992, Elahi became director of the Islamic Center of America, the country's largest Shiite mosque in Dearborn. A 2015 Farsi-language article about Elahi that appeared on the Iranian news site Pezhvak said the visa was connected to a religious conference in San Francisco. But a year later, it said, noted that the State Department initially denied Elahi's visa before the denial inexplicably was reversed.

The Department of Homeland Security (DHS) should re-examine Elahi's naturalization, Pipes told the Investigative Project on Terrorism (IPT). Any lingering ties he might have with the Islamic Revolutionary Guard Corps (IRGC) or Iranian intelligence should be investigated.

"The naturalization of Elahi ranks with allowing the Blind Sheikh [Omar Abdel-Rahman] into the United States - legacies of the lax era before 9/11 when the U.S. authorities did not take Islamism seriously. Better to review late than never the mistakes from back then," Pipes said.