WASHINGTON — The Customs and Border Protection office responsible for much of the northern U.S. border ordered its agents to detain and question Iranian Americans about their faith and military service after the U.S. killed an Iranian general, according to a memo obtained by NBC News.

CBP officials had previously denied issuing any such directive.

The CBP memo, confirmed to be authentic by a source familiar with the matter, is headed "Updated Procedures" and tagged "Threat Alert High." It notes that Iran's supreme leader vowed "forceful revenge" after the U.S. strike that killed Maj. Gen. Qassem Soleimani, commander of Iran's Quds Force, on Jan. 3.

The memo directs officers to vet "All persons (males and females) born after 1961 and born before 2001 with links" to the Palestinian territories, Lebanon or Iran, including place of birth, as well as Iranian and Lebanese nationals "or any other nationality that has traveled to Iran or Lebanon." It was issued by the Seattle field office, which controls the border from Washington to the Minnesota-Wisconsin line — more than 1,500 miles.

Click here to read the memo.

The memo said the office was looking for "extremist ideology," "deceptive behaviors" and "membership in a specialized unit — QUDS forces." It also warned that Shiite Muslims might hide their religious affiliation: "Anyone can state they are from a different faith to mask their intentions."

The memo conceded, "We have not yet had anyone admit being in [the Iranian Revolutionary Guard Corps] or QUDS forces yet."

The memo was first published by The Northern Light newspaper of Blaine, Washington. It is undated, but it appears to refer to the potential backlash for Soleimani's death as something "learned in last 24 hours."

Kiara Vaziri, an Iranian American, said she and her family were questioned after they tried to return to the U.S. from Canada in early January. Courtesy Kiara Vaziri

A number of Iranian Americans told NBC News they were detained at the Washington-Canada border for up to 10 hours on Jan. 4, the day after Soleimani's death, as they returned from routine visits to Canada. They said they were asked about their family members, military service, social media accounts and travel.

Mona Zabihian said she was coming back from a concert in Canada with friends when a CBP officer told her that she had to park her car and go into the CBP building at the port of entry instead of driving through. "We went inside. We saw a bunch of other Iranians, pregnant woman, children," she said. "I saw one of my friends from Seattle."

Zabihian said one of the officers referred to the order for secondary screening as a local order. "He mentioned that this was not a nationwide order. It was only a Washington border order," she said.

Kiara Vaziri said she and her family were also detained. "Some people got their phones taken away and were told to give their iPhone, Facebook and Instagram passwords," she said.

As media reports of the screenings emerged, CBP tweeted a denial on the evening of Jan. 5.

"Social media posts that CBP is detaining Iranian-Americans and refusing their entry into the U.S. because of their country of origin are false," it said. "Reports that DHS/CBP has issued a related directive are also false."

DHS is the Department of Homeland Security, CBP's parent agency.

The next day, Jason Givens, CBP's public affairs officer for the northern border, said via email, "I don't have anything beyond the statement that was provided yesterday."

Days later, 70 Democratic members of Congress signed a letter asking acting CBP Commissioner Mark Morgan for "any directive, email, policy, teleconference, or other communication regarding the treatment, processing, questioning, or screening of individuals of Iranian descent."

A week after the travelers were stopped, a CBP spokesperson released the following statement:

"As part of a multi-layered approach to security, CBP officers may refer for additional screening individuals who present a known risk or individuals about whom we need more information to make a determination of risk. These referrals are based on factors that could include the individual's activities, associations and travel patterns. As a result, some travelers may experience increased wait times and subsequent interviews."

When she learned of the CBP memo obtained by The Northern Light and NBC News, Rep. Pramila Jayapal, D-Wash., said Thursday: "It is becoming increasingly clear from multiple conversations with travelers and CBP staff that there was, indeed, a directive from the Seattle Field Office to target Iranian-Americans for secondary screening based on their country of origin and despite the fact that they were largely American citizens, legal permanent residents and legal visa holders.

"This is absolutely unacceptable, and it reminds us of the dark times in our country's history," she said in a statement.

Hugh Handeyside, a senior staff attorney with the American Civil Liberties Union's National Security Project, said in a statement: "If this report is true, CBP has been caught in a lie. It appears the agency did, in fact, wrongly direct officers to target and detain travelers based on national origin, and interrogate them about their religion and beliefs."

A CBP spokesperson said in an email, "CBP does not comment on leaked documents."

Download the NBC News app for breaking news

Len Saunders, a local immigration lawyer in Blaine, provided the memo to NBC News from a source who he said hand-delivered it to his office on Tuesday. Saunders believes the directive was not from Washington, D.C., but was instead the product of a "rogue" CBP office. He asked, "At what point is the head office [in Washington] going to be fed up?"

After the National Iranian American Council filed a formal complaint with the Department of Homeland Security about detentions at the Blaine border crossing, the organization was notified that the department's Office for Civil Rights and Civil Liberties was investigating.