FORT BELVOIR, Va. — Tens of thousands of military veterans who have been enduring long waits for medical care should be able to turn to private doctors almost immediately under a law signed Thursday by President Obama.

Other changes will take longer under the $16.3 billion law, which is the government’s most sweeping response to the problems that have rocked the Department of Veterans Affairs and led to the ouster of Eric Shinseki as VA secretary.

Improved access to outside care is likely to be the most immediate effect. Veterans who have waited at least a month for a medical appointment or who live at least 40 miles from a Veterans Affairs hospital or clinic will be able to see private doctors at government expense.

Expanding the VA staff by hiring thousands of doctors, nurses and mental health counselors – another key component of the law – will take months to complete, and opening 27 new clinics across the country will take at least two years.

“Implementing this law will take time,” Obama acknowledged as he signed the bill at Fort Belvoir, an Army base in Virginia just outside Washington. Service members, veterans groups and military leaders attended the ceremony, along with lawmakers from both parties.

Obama called the legislation a rare example of Republicans and Democrats working together effectively. He also said more action was needed.

“Even as we focus on the urgent reforms we need at the VA right now, particularly around wait lists and the health care system, we can’t lose sight of our long-term goals for our service members and our veterans.”

Noting issues such as mental health care and homelessness among veterans, he said, “we’ve got more work to do.”

Paul Rieckhoff, founder and CEO of Iraq and Afghanistan Veterans of America, called the new law “a Band-Aid solution,” all that Congress could accomplish in an emergency.

“Anybody who thinks this is going to fix the problem is not being honest about this,” Rieckhoff said, citing a host of issues the bill leaves unaddressed, from veterans’ suicides and homelessness to a stubborn backlog in disability claims.

Daniel Dellinger, national commander of the American Legion, the nation’s largest veterans group, called the bill an important step to begin repairing systemic problems at the VA. “But it is only one step and only a beginning,” he said.

The measure, approved overwhelmingly in the House and Senate, is a response to reports of veterans dying while awaiting appointments to see VA doctors and of a widespread practice of employees covering up months-long wait times for appointments. In some cases, employees received bonuses based on falsified records.

Veterans groups said that just as important as the new law will be the performance of new VA Secretary Robert McDonald, who was present for Thursday’s bill-signing. The former Procter & Gamble CEO has pledged to “transform” the VA, and has said improving patient access to health care is a priority, along with restoring transparency, accountability and integrity to the agency.

McDonald has directed VA facilities across the country to hold “town hall”-style meetings to make sure they’re getting honest feedback from veterans, a move Obama applauded Thursday.

“This is a labor of love for him, and he has hit the ground running,” Obama said.