Hours before a Senate vote to confirm Alejandro Mayorkas as the No. 2 official at the Department of Homeland Security, irate Republican senators began quoting a new, previously undisclosed internal audit critical of the visa program he has managed for more than four years.

An advance copy of the audit, distributed to lawmakers this week under embargo, concludes that Mayorkas’s division “is unable to prevent fraud and national security threats” as it considers visa applications from foreign investors willing to commit at least $500,000 to create U.S. jobs. A copy of the audit was obtained by The Washington Post.

The 35-page report, prepared for release Monday by the DHS inspector general, was dismissed by officials at DHS and Senate Democrats who described it as shoddy, outdated work by a discredited inspector general.

The ranking Republican on the Senate Homeland Security and Government Affairs Committee, Sen. Tom Coburn (R-Okla.) cited the audit Thursday night as one of several reasons not to rush a confirmation vote, which was expected to take place Friday morning.

“We are voting to install a nominee that could be seen as unfit to serve in the number-two position at DHS, an agency tasked with protecting our country from terrorists,” Coburn said in a speech on the Senate floor.

His position was quickly rejected by the chairman of the Homeland Security panel, Sen. Thomas R. Carper (D-Del.), who dismissed complaints about Mayorkas and most of the findings of the new report.

“I am disappointed that this Office of the Inspector General report does not make note of the extensive reforms Director Mayorkas has already implemented or the reforms that he asked Congress to authorize — all things that took place during the period this audit report supposedly covered,” Carper said.

A DHS press secretary, Christopher Bentley, called the audit “outdated and incomplete” for failing to note major improvements over the past four years. He noted that the report found no basis to challenge visa program decisions it reviewed, concluding that all were backed by “sufficient evidence.”

Mayorkas, a former U.S. attorney for Los Angeles, is one of the most controversial nominees considered by the Senate since Democrats adopted new rules that permit confirmation with a simple majority vote.

The vote follows Senate approval this week of the new secretary for the department, Jeh Johnson, who received support from a majority of GOP senators.

Mayorkas’s nomination has drawn concern from Republicans since they learned that he was the subject of a separate and ongoing inquiry by the inspector general over allegations that he mismanaged the program and showed favoritism, charges Mayorkas has rejected.

The inspector general, Charles Edwards, who was himself under investigation on unrelated charges, resigned this week. Before doing so, he told Senate staff there had been no finding of criminal wrongdoing in the ongoing inquiry of Mayorkas.

Coburn said in an interview that 18 members of the inspector general’s staff are continuing to work on the Mayorkas review, which will likely be completed by February. Coburn urged a delay to consider the IG reports and other concerns.

Carper says Mayorkas has a strong record of action against problems in the visa program and deserves confirmation and support. “We have waited long enough,” he said Thursday night.