Tashfeen Malik, the Pakistani woman killed by police after the San Bernardino shooting, was able to enter the U.S. through a visa program for foreigners engaged to American citizens, according to federal government sources.

She received a fiancee visa, also known as a K-1 visa, which allows a foreign soon-to-be spouse to travel to the U.S. for a wedding within 90 days. Malik married the other suspected shooter, Syed Farook, about two years ago, a family member told NBC News.

The fiance visa program has one of the more rigorous security screening processes — presenting far more hurdles than other avenues for foreigners to enter the U.S.

It requires an applicant to submit a standard non-immigrant form, with personal and security questions, plus certificates from police in every country an applicant has lived for over six months, a medical examination, a passport, documentation of financial support, proof of the relationship with a U.S. citizen and various fees. Applicants who are granted a fiance visa receive a sealed file of personal and government documents, which must be kept sealed and presented to security officials upon entry to the U.S.

Related: Pakistan Joins Hunt for Answers on Massacre Mom

David Seminara, a former diplomat who authored a report about “Green Card Marriages” for the Center for Immigration Studies, says fiance visas are not the leading security vulnerability in the immigration process.

“If you’re bringing a fiance to the U.S., there’s more scrutiny for that than for tourist visas,” he said.

Farook traveled to Saudi Arabia at least twice, in 2013 and 2014, acquaintances and Saudi officials told NBC News.

In 2013, he went on Umrah, a pilgrimage to Mecca. Nazeem Ali, 23, who attended Dar-Al-Uloom Al-Islamia mosque in the San Bernardino suburb of Muscoy with Farook, said the suspect told him that he planned to meet the fiancee he had found online — Malik — and to get married at the Black Stone in the Grand Mosque of Mecca.

However, Farook's brother-in-law Farhan Khan told NBC News late Thursday that the couple had married at a hotel in Saudi Arabia.

Malik arrived in the United States on a K-1 visa and they were married that same year. The Pakistani national later received U.S. permanent resident status.

While the FBI is still investigating the shooters’ motives and when they began to contemplate violence, Seminara said, as a general matter, fiance visas are not the most attractive route for foreign terrorists.

“If I were a terrorist, and I wanted to bring myself and someone else into the U.S. quickly, the tourist visa is going to be the biggest vulnerability for that,” he said, adding “The least level of scrutiny is people from the visa waiver countries.”

The U.S. waives any visa requirement for tourists from about 38 countries, primarily in Europe. Under the waiver, people from those countries can come in and out of the U.S. with only an airport screening on arrival.

On Monday the White House announced changes to that program, changes which come after deadly terror attacks in Paris earlier this month which left 130 dead.

Related: White House Strengthens Visa Waiver Program Following Paris Attacks

About 17 million people used that route to enter the U.S. in 2013, the last year federal data is available.

About 35,925 people entered the U.S. with fiance visas last year, including 519 for immigrants from Pakistan.

Michael Wildes, a former federal prosecutor, says the fiance visa process should be strengthened.

“Part of the K-1 process is getting police clearances from other countries,” he said, “America should not be relying on third-party documents.”

Wildes, who practices immigration law, argued that as the threat evolves, so should screening for potential spouses. “I have confidence that the government will eventually get this right,” he said. “Terrorists are no longer wearing suicide vests, they are appearing as housewives — we have to be two steps ahead,” he said, and "America has to have systems in place that goes further than relying on our colleague countries’ vetting systems."

Congress created fiance visas in 1970, amending federal immigration law to streamline the process for Americans marrying foreigners. The issue gained prominence during the Vietnam War, when some U.S. servicemembers ran into red tape while trying to immigrate with fiances they met while stationed abroad.

Congress has repeatedly amended the program to address potential fraud and abuse, based on concerns that fiance visas offer a coveted priority route into the U.S. Congress passed “Marriage Fraud” amendments to the law in 1986, and a separate “International Marriage Broker Regulation” law in 2005. In those efforts, much of the focus was on sham marriages, based on concerns about selling visas, mail order brides and exploitation.