“What happened was a national disgrace and yet some of the employees involved in these scandals remained on the payrolls,” Trump said. “Outdated laws kept the government from holding those who failed our veterans accountable. Today we are finally changing those laws.”

The measure was prompted by a 2014 scandal at the Phoenix VA medical center, where some veterans died as they waited months for care. The VA is the second-largest department in the U.S. government, with more than 350,000 employees, and it is charged with providing health care and other services to military veterans.

Federal employee unions opposed the measure. VA Secretary David Shulkin, an Obama administration holdover, stood alongside Trump as the president jokingly suggested he’d have to invoke his reality TV catchphrase “You’re fired” if the reforms were not implemented.

The legislation, which many veterans’ groups supported, cleared the House last week by an overwhelmingly bipartisan vote of 368-55, replacing an earlier version that Democrats had criticized as overly unfair to employees. The Senate passed the bill by voice vote a week earlier.

The bill was backed by Shulkin, who had called the department’s employee accountability process “clearly broken.” The new law will lower the burden of proof to fire employees, allowing for dismissal even if most evidence is in a worker’s favor.

The American Federation of Government Employees, the largest federal employee union, opposed the bill. But the Senate-passed measure was seen as more in balance with workers’ rights than a version passed by the House in March, mostly along party lines. The Senate bill calls for a longer appeal process than the House version — 180 days versus 45 days. VA executives would be held to a tougher standard than rank-and-file employees.

The bill also turns another of Trump’s campaign into law by creating a permanent VA accountability office, which Trump established by executive order in April.

The VA has been plagued for years by problems, including the 2014 scandal, where employees created secret lists to cover up delays in appointments. Critics say few employees are fired for malfeasance.