Washington (CNN) Over the course of a few months, President Donald Trump's core campaign promise of building a border wall has led to the longest government shutdown in US history and a national emergency declaration that's received pushback from both Democrats and Republicans.

But other critical immigration components are floundering, leaving the nation's immigration system in a vulnerable position at a time of need, several administration officials told Congress this month.

Despite the administration's unrelenting push for physical barriers and aggressive immigration policies, Homeland Security Secretary Kirstjen Nielsen said the US is on track to apprehend approximately 900,000 people along the southern border this year, nearing levels not seen since 2006.

Trump argues that erecting additional barriers along the US-Mexico border would stem the flow of migrants. Last Monday's White House budget proposal includes $8.6 billion for a border wall -- higher than his $5.7 billion demand that led to the government shutdown.

Among the problems: an overall decline in the number of Border Patrol agents over recent years and severe challenges in attracting new people to remote locations along the border. A historic backlog in the nation's immigration courts was made worse during the government shutdown. And the dramatic increase in the number of families crossing the US-Mexico border means new challenges and costs to house migrants.

"The projections are dire," Nielsen told lawmakers earlier this month. "Our capacity is already severely strained, but these increases will overwhelm the system entirely. This is not a 'manufactured' crisis. This is truly an emergency."

Border Patrol agent shortfall

The first contact that most migrants have when arriving in the US is with Customs and Border Protection personnel -- whether at a legal port of entry or when crossing illegally.

But while the Trump administration has tried to hire more Border Patrol agents, it has fallen woefully short.

In 2017, the year Trump took office, there were 19,437 Border Patrol agents patrolling the nation's borders. The administration wanted to hire an additional 5,000 agents on top of already-established hiring goals.

But that hasn't happened, and as of early February 2019, there were 19,443 Border Patrol agents, according to CBP data provided to the US Government Accountability Office.

Despite some recent small gains in both retention and hiring speed, Border Patrol is still nearly 7,000 agents below the target set by Trump, according to Rebecca Gambler, director of GAO's Homeland Security and Justice Team, who testified earlier this month.

High attrition, a long hiring process and competition with other law enforcement agencies are reasons CBP cited for its staffing troubles, Gambler said. Additionally, there are a limited number of qualified and interested candidates to live and work in remote locations along the borders, CBP officials say.

"While CBP has the ability to offer incentives for individuals to apply for, relocate to, or remain at these locations, incentives cannot solve basic, fundamental needs of our workforce and their families, such as readily accessible medical facilities, schools, and potable water," said CBP's Acting Executive Assistant Commissioner Carry Huffman and Border Patrol Rio Grande Valley sector chief Rodolfo Karisch in congressional testimony earlier this month.

One example is Lukeville, Arizona, an isolated outpost in a community of fewer than 50 people, which is a "particularly challenging" post to fill. The closest school and medical clinic is 39 miles away and the nearest metropolitan area -- Phoenix -- is 150 miles away.

The groundwater in Lukeville also requires significant treatment to make it potable due to traces of arsenic, according to Huffman and Karisch.

In February, a group of 325 Central American immigrants was arrested near Lukeville after illegally entering the country and surrendering to agents. Increasingly, CBP has been encountering large groups -- more than 100 -- of migrants crossing the southern border illegally.

Tony Reardon, National Treasury Employees Union president, whose union represents 27,000 CBP officers, agriculture specialists and trade enforcement personnel working at ports, told lawmakers earlier this month that the partial government shutdown had hurt efforts to improve retention and recruitment.

He said that the 35-day shutdown was hard on all employees, but especially so for those with the least means. He called it an "unconscionable way to treat" the agency's " dedicated employees."

"The employees I represent are frustrated and their morale is indeed low. These employees work hard and care deeply about their jobs and their country. These men and women are deserving of more staffing and resources to perform their jobs better and more efficiently," he said.

Although Customs and Border Protection for the first time in six years hired more employees than it lost to attrition, Huffman said," there is much more work to do."

"We enforce hundreds of US laws and regulations on issues from immigration to trade. This is noble and vital work, but there is one serious problem. There are not enough of us," he said during the House Homeland Security Committee hearing.

He even made a hiring pitch during the hearing.

"CBP is hiring. If you have friends, relatives or constituents of higher morale character and are looking a way to serve the greater good, there's no better organization in the federal government to do so than for US Customs and Border Protection," he said.

Accenture and polygraphs

In December, the Department of Homeland Security inspector general found "serious performance issues" with a CBP hiring contract with Accenture. At the time of the watchdog report, Accenture had only processed two employees that accepted job offers. That number is now 56, according to John Goodman, chief executive of Accenture Federal Services.

Goodman said the report ignored the progress made but acknowledged that CBP had pressed "the pause button" on the contract to "determine how the program can move forward most effectively."

He said the most "significant challenge" the company faced was with polygraphs, calling it a "major choke point in the hiring process."

In addition to certifications and federal experience, there are training, monitoring and testing requirements that CBP uses "that makes it significantly harder to bring on new polygraphers," Goodman said.

A CBP spokesperson, who asked not to be named, said the agency is "constantly working to strengthen its hiring capabilities to ensure staffing for critical frontline operations, while maintaining our high personnel standards."

Immigration and Customs Enforcement

Generally, once migrants are processed, they're handed over to Immigration and Customs Enforcement, which has a limited capacity of how many migrants it can hold at a given time.

The shutdown-ending spending bill last month included funding for an average 45,274 detentions beds per day, with the intent to return to 40,520 by the end of the fiscal year.

Given the influx of migrants at the border, the agency has to reckon with an increased demand for beds. As of March 4, for example, the average number of ICE detainees was 46,496 -- the highest on record since the beginning days of the agency in 2003, according to ICE.

"There's no beds," said John Sandweg, who previously served as the acting director of ICE under the Obama administration. "They're definitely strained right now."

That's based on the perception on that all migrants need to be detained, Sandweg added. Trump has decried the alternative of releasing migrants until their immigration court dates. At the current rate of apprehensions, detention beds are likely to get filled faster. In February alone, more than 76,000 people were apprehended crossing illegally or without proper papers, the highest number of "encounters" in any February in the last 12 years, according to CBP.

Of the 76,000, 7,250 were unaccompanied children and 40,385 were people who came with family members, marking a significant shift in the migrant population and as a result, posing a unique set of challenges. In previous years, single adult males from Mexico who could quickly be returned made up the majority of apprehensions.

The Health and Human Services Department is responsible for the care of unaccompanied children and as a result, they, too, are feeling the pressures of the influx of migrants. HHS Secretary Alex Azar said the agency plans to move $385 million in fiscal year 2019 funding for the unaccompanied alien children program.

The President's latest budget proposal includes $2.7 billion for 54,000 beds, setting up a confrontation between Republicans and Democrats, who pushed back against the administration's previous request of 52,000 beds.

Massive backlog in immigration courts

The US has a separate court system within the Justice Department -- which is overseen by the Executive Office for Immigration Review -- for adjudicating immigration cases. In recent years, the office has had to contend with a historic backlog of pending cases.

EOIR Director James McHenry told lawmakers earlier this month that there are around 850,000 pending cases, marking what appears to be the largest backlog since the creation of the agency in 1983.

And the shutdown over the border wall only made things worse. Roughly 60,000 hearings had to be postponed during the shutdown, McHenry said.

During that time, immigration courts that handle non-detained dockets -- the cases of people who are not in immigration detention -- were closed. As a result, those cases were postponed. The only cases that moved forward during the shutdown were those of immigrants in detention.

Immigrants fighting deportation generally have a chance to make their case in court, where they can ask a judge to allow them to stay in the US by arguing they qualify for asylum or another legal option.

An uptick in asylum claims is among the factors straining resources.

"Our challenge going forward is with increased amounts of immigration, EOIR sees most of the downstream effects of that," McHenry said. "Many individuals come here and make asylum claims and are placed in immigration proceedings, so they end up in our court system."

In an acknowledgment of the challenges facing the immigration court system, the administration has sought to bulk up resources to resolve cases quickly. Under former Attorney General Jeff Sessions, the Justice Department also implemented an annual quota that judges were required to meet -- a move that received criticism from the National Association of Immigration Judges.

A spending bill passed by Congress last month included funding for 75 new immigration judges, which is in line with the administration's ask and allocates $7.4 million for additional attorneys and for courtroom expansion to assist with cases currently in the system. Trump's budget proposal ups the request to 100 new "immigration judge teams."

As of March 5, there are 427 immigration judges nationwide, according to EOIR. That is expected to increase to roughly 450 next month.