Veterans Affairs Department officials will get the budget help they need to avoid facility shutdowns in August after the Senate approved a last-minute deal Thursday.

The move comes a day after House lawmakers overwhelmingly backed the plan and about a week after VA Secretary Bob McDonald appeared on Capitol Hill to warn Congress that health care for tens of thousands of veterans could be disrupted without a budget fix.

The measure allows the VA to use about $3.3 billion in funds assigned solely to the new Choice Card program to cover other account shortfalls, a move that lawmakers have resisted over the last year.

But McDonald said use of the Choice Card program has grown slowly while outside care programs have increased dramatically, leading to the budget problems.

The measure includes language to consolidate all outside care efforts into a single "Veterans Choice Program," to provide less bureaucracy and better funding flexibility. VA officials must submit plans to do that by November.

It also requires biweekly reports to Congress on how the transferred money is being spent, in response to lawmakers' concerns they were caught unaware of the department's mounting financial problems.

"We're in this situation, quite frankly, because of gross ineptitude in planning that can only be characterized as malpractice in management," said Sen. Richard Blumenthal, D-Conn., ranking Democrat on the Senate Veterans' Affairs Committee, in the moments before the vote. "Congress cannot be expected to continue to bail out VA because of mismanagement."

Department officials said they didn't know the extent of the shortfall until the start of the summer, but have warned for the last year that inflexible budget accounts could create such fiscal woes.

But critics have accused the VA of covering up the budget problems until the last minute in order to raid the Choice Card program, authorized by Congress last summer in an effort to force the VA to give veterans wider options in their health care offerings.

Lawmakers set aside $10 billion for the temporary program, and have repeatedly resisted efforts to draw on that money for other purposes. But McDonald said other established outside care programs have proven to be a quicker outlet for getting veterans into doctors' offices, and freeing up the money better responds to the population's needs.

The VA funding transfer was included as part of the three-month highway bill extension rushed through Congress in the final days of the summer session.

It also includes language expanding the Choice Card program to allow more veterans facing lengthy wait times for VA care to seek private-sector help, including exemptions for veterans who live within 40 miles of a VA clinic to go outside if that facility doesn't offer the specialized services they need.

The bill also includes the so-called "Hire More Heroes" Act, billed by Republicans as both a boost to veterans employment and a chance to roll back part of the president's controversial health care law.

The measure would allow businesses to hire veterans without having them count as full-time employees under the Affordable Care Act, provided they already have health insurance through the VA or the Defense Department.

Congressional Democrats and the White House have publicly complained about the motivation behind the law but also offered limited objections, calling it a reasonable update to health insurance rules.

President Obama is expected to sign the measure into law in the next few days.