In the grand scheme of Virginia's $1.4 billion budget deficit, the $9,000 the state spent repairing Helen Gary's house last year hardly broke the bank. But for the 75-year-old Arlington County native, whose house was saturated each time it rained because of a leaky roof, it meant having a safe and dry home.

"When I came home from the hospital after a small operation, the whole house was leaking. The ceilings were torn down and I was having a tough time, you better believe it," said Gary. Now, with a new roof, new ceilings and rugs and a fresh paint job, she said, "I have a home I can be proud of."

Gary and hundreds of other Virginians are lucky they got state housing assistance when they did. Under Gov. L. Douglas Wilder's plan to erase the state's budget deficit, the agency that funded the repairs, the Department of Housing and Community Development, is to be decimated: It is slated to lose at least $38 million of its $50 million two-year budget. Most of the cuts are coming from lottery proceeds that have been redirected to help pay off the deficit.

According to housing advocates, spending on housing is taking a deeper hit than perhaps any other area of the budget at a time when many parts of the state are facing a housing crisis. The problems are especially acute in Northern Virginia, where rising property values have made homes and apartments unaffordable for many, and in the southwest part of the state, where many poverty-stricken families still do not have plumbing.

"With the budget cuts at the state level, the state government is no longer a player, and the federal government hasn't been a player in a long time" in housing matters, said Fairfax Supervisor Thomas M. Davis III (R-Mason), adding that local governments cannot make up the difference.

"What this does in the long haul is overcrowd apartments, increase zoning violations and create disastrous living conditions, not just for people in the apartments, but for people who live in the residential areas around them," Davis said.

The key program being cut is the Virginia Housing Partnership Fund, which was established by the state in 1988. It provides grants and low-interest loans to local governments, nonprofit housing groups and low-and moderate-income families.

Some of the state money was doled out in small, highly personalized grants, while on other occasions the money was the state's share of a larger project involving state, local, federal and private funding.

For instance, 19 elderly or disabled homeowners in Fairfax received about $500 each to make emergency repairs to problems ranging from unsafe wiring to faulty plumbing to broken furnaces. An additional $250,000 will be the state's share of the $5.2 million renovation of Stonegate Village Apartments, a 244-unit complex in Reston.

In the two years ending June 30, Northern Virginia governments and private housing agencies received more than $8.5 million in partnership funds, according to the partnership's 1990 annual report.

About $3.6 million was targeted to Arlington County, $2.7 million to Fairfax, $1.6 million to Alexandria and $734,000 to Prince William.

"This in effect terminates the state's responsibility for housing," said Albert C. Eisenberg, chairman of the Arlington County Board.

"We cannot make up for it unless we rob from some other program . . . . "The thing that's so disappointing . . . {is that} Virginia showed leadership in the area of state support for affordable housing, and terminating that fund sends Virginia down to the bottom of the list of states," Eisenberg said.

In addition to the loss of the lottery money, Housing and Community Development -- like all other state agencies -- has been ordered by Wilder to prepare for a 5 percent cut in its biennial operating budget.

A 5 percent reduction would mean a loss of $787,112, according to a July report filed with state budget officers, and require cuts at 69 state-supported shelters and reduce by 60 the number of families helped by a "homeless intervention" program.

Some state officials were not as pessimistic as their local counterparts.

State Del. Alan A. Diamonstein (D-Newport News), chairman of the Housing Study Commission that spawned the partnership, said he hopes money from state housing bonds can be used "on a temporary stopgap basis" to help make up for the lost lottery money.

"The governor's office has indicated that they, too, want to try to find some way to prevent the termination of all these programs," Diamonstein said. "It hasn't been worked out yet, but everybody knows the need, and we're trying to find a solution."

The Arlington Housing Corp., a private, nonprofit housing organization that helped with Helen Gary's home renovation, received $475,000 in grant and loan money from the partnership in the last two years, said Deputy Director Steve Smith. He said state money accounted for about half of the corporation budget last year.

Losing that money could have a major impact on people such as Gary.

"The elderly can't have work done any other way," said her daughter, Debra Carr. "They're on a fixed income and they have to use their money every month for medication, and there's nothing left. I was thankful we could get something going."

Staff writer John F. Harris contributed to this report.