FBI Director Christopher Wray on Wednesday said that the number of illegal immigrants evading Border Patrol agents and escaping into the country is a source of "great concern" for the agency, as he told lawmakers that threats from the other side of the border are "consuming" FBI field offices.

Wray testified to lawmakers on the House Homeland Security Committee about "worldwide threats" to the U.S. Chairman Mark Green asked Wray about the numbers of gotaways — illegal immigrants at the border who evaded Border Patrol — which have exceeded 600,000 in FY 23. Customs and Border Protection (CBP) sources tell Fox News there have been over 47,000 gotaways since the beginning of the new fiscal year on Oct. 1.

Green said the number of gotaways since the beginning of the Biden administration could be well over two million.

HOUSE HOMELAND CHAIR GREEN TO WARN US IS AT ‘ONE OF THE MOST DANGEROUS TIMES' IN HISTORY DURING THREAT HEARING

U.S. Homeland Security Secretary Alejandro Mayorkas, left, looks on as FBI Director Christopher Wray testifies before the House Committee on Homeland Security hearing about "Worldwide Threats to the Homeland" on Capitol Hill in Washington, D.C., on Wednesday.

U.S. Homeland Security Secretary Alejandro Mayorkas, left, looks on as FBI Director Christopher Wray testifies before the House Committee on Homeland Security hearing about "Worldwide Threats to the Homeland" on Capitol Hill in Washington, D.C., on Wednesday. (SAUL LOEB/AFP via Getty Images)

"Can the FBI guarantee American people that known or suspected terrorists, including any from Hamas or other terror groups, are not amongst those gotaways?" he asked.

"Well, certainly the group of people that you're talking about are source of great concern for us. That's why we're aggressively using all 56 of our joint terrorism task forces," Wray said.

He later said that "any time you have a group of people in the United States that we don't know nearly enough about, that is a source of concern for us from a perspective in our lane of protecting Americans."

Wray testified that there has been an increase in the number of known or suspected terrorists attempting to cross the border in the last five years — the number of those encountered on the terror watchlist hit record numbers in FY 23.

Wray said he couldn’t speak to why that is, but added "the threats that come from the other side of the border are very much consuming all 56 of our field offices, not just in the border states."

FBI DIRECTOR WRAY WARNS TERROR THREAT TO AMERICANS AT 'WHOLE OTHER LEVEL' AMID HAMAS-ISRAEL CONFLICT

The testimony comes amid renewed concern, particularly from Republicans but also from within the Biden administration, about the potential for terrorists to use the border to gain access to the United States, particularly as Border Patrol agents are dealing with record migrant numbers.

There were over 249,000 migrant encounters in October alone, after an FY 23 which broke records for migrant encounters. Republicans have pinned the blame on the Biden administration for its policies, while the administration says it needs immigration reform and more funding to address a "broken" immigration system.

Those concerns about terrorism have been renewed in the wake of the Hamas terror attack on Israel. Green told Fox News Digital on Tuesday that the U.S. is at "heightened risk," and said the "open door policy" at the border is largely to blame.

Wray has previously told lawmakers in the Senate that the threat of a terror attack against Americans has been raised to a "whole other level" due to ongoing conflict in the Middle East. He said the most immediate concern includes homegrown violent extremists who are inspired by foreign terrorist organizations, or by domestic violent extremists who are targeting Muslim or Jewish targets.

CLICK HERE TO GET THE FOX NEWS APP

A CBP memo warned fighters from Hamas, Hezbollah and other groups may seek entry into the U.S., although the agency said last month it has had no indication of fighters attempting to enter the U.S.

"CBP has seen no indication of Hamas-directed foreign fighters seeking to make entry into the United States," a CBP spokesperson said at the time.

The Department of Homeland Security’s FY 24 threat assessment warned that agents have encountered a growing number on the watch list and warned that "terrorists and criminal actors may exploit the elevated flow and increasingly complex security environment to enter the United States."

"Individuals with terrorism connections are interested in using established travel routes and permissive environments to facilitate access to the United States," the assessment also said.

However, the agency has also stressed that it works "tirelessly to screen, vet, and prevent anyone who poses a threat from entering the country" and that encounters of known or suspected terrorists are rare — with watchlist encounters also including those associated with known or suspected terrorists, including relatives.

"Our border security efforts include biometric and biographic screening and vetting," a DHS official said. "CBP screens and vets every individual encountered, and if an individual is determined to pose a potential threat to national security or public safety, in coordination with the Joint Terrorism Taskforce (JTTF), we either deny admission, detain, remove, or refer them to other federal agencies for further vetting and prosecution as appropriate. "

Fox News' Aubrie Spady and Griff Jenkins contributed to this report.