President Barack Obama hugs Sgt. Maj. James McGruder as he arrives to speak at the Wallace Theater in Fort Belvoir, Va., Thursday. (AP Photo/Jacquelyn Martin)

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 Barack 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 Veterans Affairs Department 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.

"This will not and cannot be the end of our effort," he said. "And 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 including 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.

Under the new law, employment rules will be revised to make it easier to fire senior VA executives judged to be negligent or performing poorly.

The bill devotes $10 billion in emergency spending over three years to pay private doctors and other health professionals to care for qualifying veterans who can't get timely appointments at VA hospitals or clinics or who live more than 40 miles from one of them. It includes $5 billion for hiring more VA doctors, nurses and other medical staff and $1.3 billion to open 27 new VA clinics across the country.

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 was sworn in July 30 to lead the sprawling agency, which employs more than 310,000 people and provides health care for nearly 9 million enrolled veterans and disability compensation for nearly 4 million.

McDonald 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. He 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.

McDonald travels to Phoenix on Friday to visit the VA hospital where the scandal started amid reports of secret waiting lists and patients dying while waiting for care.

The VA has reported recent progress in reducing delays. VA data from mid-July showed about 35,000 veterans had waited at least 90 days for initial appointments, down from 57,000 in mid-May.

The VA announced last week that it planned to fire two supervisors and discipline four other employees in Colorado and Wyoming accused of falsifying health care data.