The U.S. Border Patrol apprehended nearly 400,000 people who were attempting to cross the U.S.-Mexico border during the 2018 fiscal year, Trump administration officials revealed Tuesday, an increase of more than 90,000 from the prior year.

The numbers from U.S. Customs and Border Protection show a 21 percent increase in unaccompanied minors attempting to cross the southern border and a 42 percent increase in families who were apprehended attempting to cross the border. Nearly a third of all people apprehended at the U.S.-Mexico border were families and children — about 157,248 out of 395,579 total apprehensions.

By comparison, 117,057 families and children were apprehended at the border in fiscal year 2017 out of 303,916 total apprehensions.

Most of the unaccompanied minors and family units who were apprehended are from Guatemala. The numbers show a 104 percent increase in the number of apprehended family units from the Central American country, as well as a 51 percent increase in the number of unaccompanied minors. Children and families from Honduras accounted for the second largest increase -- as apprehensions of minors from that country were up 40 percent and apprehensions of family units increased by 76 percent.

In all, a total of 521,090 people were either apprehended or deemed "inadmissible" after arriving at a port of entry, a 25 percent increase from the 415,517 who were apprehended or deemed inadmissible in fiscal year 2017.

The numbers were released as President Trump sought to make immigration a key issue of next month's midterm elections. He has criticized Guatemala, Honduras and El Salvador for not stopping people from leaving their countries and said in a tweet on Monday that the U.S. would "now begin cutting off, or substantially reducing, the massive foreign aid routinely given to them." He has also threatened to use the military to close down the United States' southern border as a caravan of an estimated 7,000 people -- many of them Honduras -- has crossed into Mexico from Guatemala this week.

The Associated Press contributed to this report.