Since President Barack Obama escalated the conflict soon after taking office in 2009, the United States has resettled 6,205 Afghan refugees and 766 asylees within its borders, in addition to admitting 24,352 Afghans under a special immigrant visas (SIVs) program for those who were employed by the U.S. government at some point during the ongoing war, according to U.S. government data.

That means that since October 1, 2008, the beginning of fiscal year 2009, nearly 31,323 Afghans have been admitted into the United States as refugees, asylees, or special immigrants, all forms of immigration programs that provide a pathway to citizenship to the recipients and some of their family members.

Meanwhile, Afghanistan continues to descend into chaos as the Afghan security forces and civilians suffer record numbers of casualties, primarily at the hands of a resilient Taliban that continues to cultivate its relationship with al-Qaeda. Nearly 15 years of U.S.-led war has some Afghans harboring resentment as they consider their country is still heading in the wrong direction.

In June, the office of Jeff Sessions (R-AL), chairman of the Senate Judiciary Subcommittee on Immigration and the National Interest, found that nearly two-thirds of the 580 individuals convicted of terrorism or terrorism-related crimes in the United States between 9/11 and the end of 2014 were born abroad, including refugees, Afghan nationals, and naturalized citizens.

Ahmad Rahami, the Muslim charged with federal crimes in connection to the weekend bombings in New York and New Jersey that left 31 people injured, was born in Afghanistan in 1988.

He came to the United States in January 1995, “several years” after his father arrived in America seeking asylum, which can be extended to relatives, reports CNN. The father of the suspect, who has been charged with federal counts of using a weapon of mass destruction and bombing public places, fought the Soviet Army in the 1980s as an Afghan mujahedeen (jihadist), the same group of Islamic fighters who spawned Osama bin Laden and his foundation of al-Qaeda.

Rahami became a naturalized U.S. citizen in 2011, the same year he visited his father’s native southern Afghan province of Kandahar, known as the birthplace of the Taliban and an al-Qaeda stronghold.

Although as refugees and asylees, individuals may lose U.S. immigration benefits if they go back to their native country where they claim they are facing persecution, there are apparently ways to get around that. An Afghan could very easily travel to Pakistan and cross the border directly into Kandahar.

Nevertheless, such a visit should raise red flags.

The Senate Judiciary Subcommittee on Immigration and the National Interest found:

[T]hat at least 380 of the 580 individuals convicted of terrorism or terrorism-related offenses between September 11, 2001 and December 31, 2014, were born abroad. …. Of the 380 foreign-born, at least 24 were initially admitted to the United States as refugees, and at least 33 had overstayed their visas. Additionally, of those born abroad, at least 62 were from Pakistan, 28 were from Lebanon, 22 were Palestinian, 21 were from Somalia, 20 were from Yemen, 19 were from Iraq, 16 were from Jordan, 17 were from Egypt, and 10 were from Afghanistan. …. Out of the 198 U.S. citizens we were able to identify, at least 100 were naturalized citizens who initially came to the United States through one of our immigration programs.

According to data maintained by the U.S. Department of State, 30,557 Afghans either resettled as refugees (6,205) across the United States or were granted special immigrant visas (924,352), normally to translators and interpreters helping the U.S. government between October 1, 2008, and August 31, 2016 (fiscal years 2009 through the latest figures available for 2016).

Meanwhile, the U.S. Department of Homeland Security (DHS) shows that 766 Afghans were granted asylum between fiscal year 2009 and 2014 (October 1, 2008, through September 30, 2014), the latest year for which data is available, taking the total number of Afghans willingly brought into the United States amid the deadliest and most active period of the Afghanistan war to at least 31,323.

Some Afghans, following in the footsteps of their compatriots in Europe, have attempted to enter the United States illegally. At least four Afghans were apprehended trying to sneak across the U.S.-Mexico border last year. Based on a government estimate of successful entries, known as “gotaways,” two may have entered illegally.

Under Obama’s watch, the U.S. military presence in Afghanistan reached a peak of nearly 100,000, along with casualties suffered by American and Afghanistan troops and civilians, including some U.S. citizens employed by the Pentagon.

According to Afghanistan’s Ministry of Refugees and Repatriation, Afghan refugees are returning to their native country in droves, despite the deteriorating security conditions.

Citing the Ministry, TOLO News reports that on average, “around 6,000 Afghan refugees return to the country daily – with most of them coming in from Pakistan,” adding, “This is the highest seen in 14 years.”

Of course, there has been friction between Afghanistan and Pakistan as the Afghans take military assistance from Pakistan’s regional rival India, among other issues, which could be prompting Islamabad to simply kick out their neighbors.