WASHINGTON — Congress is moving with what one senator called “lightning speed” to help thousands of military veterans enduring long wait times for VA medical care.

The Senate was poised to vote by Thursday on a measure making it easier for veterans who have encountered delays getting initial visits to receive VA-paid treatment from local doctors instead. The measure closely resembles a bill approved unanimously Tuesday in the House, prompting optimism among lawmakers from both parties that a compromise version could be on its way soon to President Barack Obama for his signature.

“Maybe we can show the United States of America that people can come together on a very, very important issue and do it in rapid fashion,” said Sen. Bernie Sanders, I-Vt., chairman of the Senate Veterans Affairs Committee.

The legislative effort comes as a federal law enforcement official said the Justice Department has formally asked the FBI to review materials provided by the Veterans Affairs inspector general.

The official spoke on condition of anonymity because the official was not authorized to discuss an ongoing criminal investigation on the record.

Richard Griffin, the VA’s acting inspector general, issued a scathing report that confirmed allegations of excessive waiting time at VA hospitals and inappropriate scheduling practices. The report, which followed allegations that 40 patients died while awaiting care at a Phoenix hospital where employees kept a secret waiting list to cover up delays, found that 1,700 veterans seeking treatment at the Phoenix facility were at risk of being “forgotten or lost.”

While the Justice Department has not undertaken a full-fledged investigation, the request for FBI involvement represents an escalation into concerns of possible criminal conduct by VA employees. FBI Director James Comey had previously said that the FBI had not been asked to participate in any investigation. But the law enforcement official said Wednesday the situation has now changed.

The VA, which serves almost 9 million veterans, has been reeling from mounting evidence that workers falsified reports on wait times for medical appointments in an effort to mask frequent, long delays. An internal audit released this week showed that more than 57,000 new applicants for care have had to wait at least three months for initial appointments and an additional 64,000 newly enrolled vets who requested appointments never got them.

VA Secretary Eric Shinseki resigned May 30, but the situation remains a continuing embarrassment for Obama and a potential political liability for congressional Democrats seeking re-election in November.

“It’s urgent that we get this done to resolve some of the outstanding issues within the VA,” said Senate Democratic leader Harry Reid.

In a rare moment of agreement with Reid, Senate Republican leader Mitch McConnell also was upbeat about the prospects of the veterans bill.

“We have a bipartisan veterans bill negotiated the way we used to do business in the Senate, with members of both parties, ready to go,” McConnell said Tuesday. He added that he hoped the Senate could take up the bill “very quickly, maybe even finish it this week.”

Sen. John McCain, R-Ariz., a chief author of the Senate measure, said it shouldn’t be hard for the two chambers to craft a compromise version. “I don’t think there’s a lot of major differences,” he said.

Sanders, who co-wrote the Senate bill with McCain, said that by Senate standards, lawmakers were moving at “lightning speed.”

The legislative effort comes close on the heels of a Veterans Affairs Department audit showing that more than 57,000 new applicants for care have had to wait at least three months for initial appointments and an additional 64,000 newly enrolled vets who requested appointments never got them.

“I cannot state it strongly enough: This is a national disgrace,” said Rep. Jeff Miller, R-Fla, chairman of the House Veterans Affairs Committee and chief author of the House legislation.

Rep. Mike Michaud of Maine, top Democrat on the Veteran Affairs Committee, said veterans receive excellent care at VA facilities — if they can get into the system. “As we have recently learned, tens of thousands of veterans are not getting in.”

The House and Senate bills each would spend hundreds of millions of dollars to hire more doctors and nurses, but that may be easier said than done, given a nationwide shortage of primary care physicians.

Primary care physicians are expected to become increasingly in demand as millions of people newly insured under the federal health care law start looking for regular doctors. The Association of American Medical Colleges has projected that by 2020, there will be 45,000 too few primary care physicians, as well as a shortage of 46,000 surgeons and specialists.

Shortages tend to be worse in both rural and inner-city areas.

The American Medical Association added its voice as the House was voting Tuesday. At its annual policy meeting in Chicago, the AMA approved a resolution urging Obama to take immediate action to enable veterans to get timely access to care from outside the VA system. The nation’s largest doctors group also recommended that state medical societies create and make available registries of outside physicians willing to treat vets.

The Senate bill would authorize the VA to lease 26 new health facilities in 17 states and Puerto Rico and spend $500 million to hire more doctors and nurses. The House bill does not include a specific dollar amount, but Miller said the VA would save $400 million annually by eliminating bonuses, money the agency could use for expanded care.

The House and Senate bills would let veterans facing long delays for appointments or living more than 40 miles from a VA facility choose to get care from non-agency providers for the next two years. Some veterans already get outside care, but the process is cumbersome and riddled with delays, veterans and their advocates say.

The Senate bill would make easier to fire top VA officials, although with more employee safeguards than in an earlier, House-passed bill.