The federal government is subjecting veterans to long delays in obtaining mental health care and medical benefits, but the power to change the system rests with officials and Congress, not the courts, a federal judge in San Francisco ruled Wednesday in dismissing a lawsuit by veterans' advocates.

U.S. District Judge Samuel Conti said veterans' groups had failed to show a "systemwide crisis" in mental health care that would justify the courts intervening in the workings of the Department of Veterans Affairs. And he said courts lack authority to order the sweeping changes the plaintiffs seek, such as forcing the VA to make quick decisions on whether veterans are eligible for care and ordering the agency to promptly improve suicide prevention programs and mental health care.

Conti conceded that evidence presented during a two-week nonjury trial in April showed that veterans had high rates of suicide and post-traumatic stress disorder, and that in some cases were being forced to endure long waits for medical referrals and care.

The VA is understaffed and takes an average of nearly 4 1/2 years to hear veterans' appeals of benefit denials, and a long-range improvement plan the agency adopted four years ago is still mostly in the pilot stages, the judge said.

But Conti said, "The remedies sought by plaintiffs are beyond the power of this court and would call for a complete overhaul of the VA system.

"Congress has specifically precluded district courts from reviewing veterans' benefits decisions and has entrusted decisions regarding veterans' medical care to the discretion of the VA secretary," the judge, a World War II veteran who was appointed to the bench by President Richard Nixon, said in his 82-page ruling.

Lawyers for the veterans said they would appeal.

"If the judge is correct, the VA can do whatever it wants, and all the rights (of veterans) are unenforceable," said attorney Gordon Erspamer. "That just can't be the law. There's got to be a remedy somewhere for the poor slobs who are fighting for our country."

Paul Sullivan, executive director of Veterans for Common Sense, one of the plaintiff organizations, chose to look on the bright side. Conti "confirmed many of our allegations" and issued "a huge alarm bell for Congress and the VA to take action now," said Sullivan, a Gulf War veteran.

The suit was filed last year by Sullivan's organization, which is based in Washington, and a second group in Santa Barbara, Veterans United for Truth. They accused the VA of making mental health care virtually unavailable to thousands of discharged soldiers through perfunctory exams, delays in referrals and treatment, and a prolonged and complex system of awarding medical benefits.

They cited internal department e-mails, released in response to the suit, that reported 18 suicides a day among all veterans and 1,000 suicide attempts a month among those under VA care. About 30 percent of the nation's 24 million veterans receive medical care from the department.

One e-mail from VA official Ira Katz in February referred to the 1,000 monthly suicide attempts and cautioned, "Shh! . . . Is this something we should (carefully) address ourselves in some sort of release before someone stumbles on it?"

The plaintiffs also cited a recent Rand Corp. study estimating that 300,000 troops returning from Afghanistan or Iraq suffered from post-traumatic stress disorder or major depression. They also noted a May 2007 report by the VA's inspector general that found more than 60 percent of the agency's health centers lacked suicide-prevention strategies for returning veterans, and 70 percent had no tracking systems for veterans at risk of suicide.

In Wednesday's ruling, Conti said members of the two veterans groups "have faced significant delays in receiving disability benefits and medical care from the VA," often with "dire consequences."

But he said the evidence also showed that a majority of returning veterans are being seen within 30 days at clinics offering mental health services. While federal law entitles veterans to five years of care from the VA after they are discharged from the military, Conti said, "it is beyond the power of this court to determine when and how such care shall be provided."

Likewise, he said, the law allows the VA to set the timetable for implementing the five-year mental health plan it issued in 2004, which includes a suicide-prevention program.

Conti also rejected the plaintiffs' request to shake up the VA's system of approving medical benefits and handling appeals. They argued that their rights are violated by a system that denies them the right to have a lawyer in pressing initial claims, takes an average of 4.4 years to decide appeals, and allows a VA office to reduce awards of more than eight years of benefits, or $250,000 in cash, without notifying veterans that their cases are being reviewed.

Although the system's slow pace is troubling, Conti said, only 4 percent of veterans appeal denials of benefits, and the VA would have to divert money and staff from processing claims to meet the timetables the plaintiffs seek.