A federal judge ruled Thursday the U.S. Department of Veterans Affairs misused its sprawling West Los Angeles campus by leasing land for a hotel laundry, a film studio storage lot and UCLA's baseball stadium, but stopped short of ordering the tenants off the property.

U.S. District Judge S. James Otero said the agency had abused its discretion by leasing land for purposes "totally divorced from the provision of healthcare," but delayed enforcement of his order so the government could appeal.

UCLA, whose baseball team has played on the VA property in Jackie Robinson Stadium for nearly 50 years, said it would do "everything possible" to remain there. A spokeswoman for the U.S. Department of Justice declined to say whether the government would challenge the ruling.

The ACLU of Southern California had sued on behalf of veterans with post-traumatic stress disorder and brain injuries, saying the 387-acre property should have been used to house and help homeless veterans too disabled to seek outpatient services. The government argued the leases produced revenue for veteran health care services.

Mark Rosenbaum, the ACLU's chief counsel, said the ruling will return the campus to its proper purpose.

"Those who served this nation in our time of need, now the VA is going to have to serve them in their time of need," Rosenbaum said.

U.S. Rep. Henry A. Waxman (D-Beverly Hills) described the decision as a "triumph" and called on the government agency to restrict use of the campus to direct aid to veterans.

Los Angeles County has the most homeless veterans in the country -- 6,300 by the latest count, down from 8,000 two years before. Despite more than a decade of protest, buildings on the Veterans Affairs campus remain underutilized, although the department is in the midst of renovating one structure as a therapeutic housing complex for 65 chronically homeless veterans.

The nine leases the judge struck down were a particular sore point, as they supported uses that conferred little or no direct benefit on veterans.

The tenants included the Brentwood School, a private K-to-12 institution that has been using a 20-acre parcel on campus as an athletic complex, with tennis and basketball courts; Sodexho Marriott Laundry Services, which cleaned hotel linens on the property; the Westside Breakers Soccer Club, which used the MacArthur Field for practices and matches; and Twentieth Century Fox Television, which used its parcel to store sets.

In a written statement, a UCLA spokesman said the university employs veterans at the stadium, gives them free admission to non-playoff home games and hosts the local American Legion baseball league.

"UCLA will be in dialogue with plaintiffs and the VA so we can continue our partnership is support of veterans," the statement said.

UCLA won its first College World Series championship this year.

Rosenbaum said the government should end the case.

"Every day an appeal is pending the veterans affairs is putting the needs of private school students and college students over our veterans," Rosenbaum said.