Newly released government data shows 98 percent of families who were apprehended after illegally entering the United States from Mexico in fiscal year 2017 were never deported and remain in the country.

In that fiscal year, which ended Sept. 30, 2017, 94,285 people unlawfully crossed the southwest border from Mexico and claimed to be a "family unit" from El Salvador, Guatemala, and Honduras, according to Department of Homeland Security information shared with the Washington Examiner.

[Related: US-Mexico border apprehensions spike past 45,000 in August]

Of that group, around 1,500 people have been removed from the country, or about 1.5 percent of the total.

DHS spokeswoman Katie Waldman said legal "loopholes" that mandate families not be held more than 20 days by DHS have allowed people to avoid facing consequences for trespassing because they are not prosecuted, and instead are released.

“Because of restrictive judicial orders and catch and release loopholes that leave us with no recourse for removal, we are seeing a record number of family units apprehended at the southwest border," Waldman said in an email to the Washington Examiner.

"In fact, of the nearly 100,000 family units from noncontiguous such as El Salvador, Guatemala, and Honduras apprehended or encountered at the border in Fiscal 2017, only 1.4 percent of them had been removed by the third quarter of Fiscal Year 2018," Waldman added. "Secretary [Kirstjen] Nielsen has been urging Congress to act and close these loopholes that pull family units to the United States.”

The rate of deportation was similar for "unaccompanied alien children," or minors who traveled from Central America to the U.S. CBP has said the majority of children come with smugglers, who are tasked with getting them to and across the border, then let Americans law enforcement apprehend them.

Last year, 31,754 kids from those nations were apprehended by border agents. As of June 30, 98.2 percent of them were still in the U.S.

When a child arrives at the border without a parent or legal guardian, he or she is turned over to Health and Human Services who will care them until a family member or friend in the U.S. can be located and vetted. Then the child will be released to that person.

Families apprehended and then released are typically given ankle monitors so Department of Homeland Security officials can ensure they show for immigration court dates in the future. The large majority of families apply for asylum after illegally entering the country.

President Trump has said those seeking asylum should apply at official ports of entry rather than trespassing. Some groups have claimed people applying for asylum at ports were denied the ability to apply. Customs officials have said due to traffic and other factors, they can only process a certain number per day.