RICHMOND, NOV. 20 -- Virginia Military Institute's battle to keep out women was dealt two sharp setbacks today, as Gov. L. Douglas Wilder threatened to withhold state money from the school and Attorney General Mary Sue Terry said she may stop defending VMI in a sex discrimination suit.

Wilder, dramatically reversing earlier statements in which he said that his personal views on the VMI question were of no significance, declared, "I believe that no person should be denied admittance to a school supported by state funds solely because of his or her race or gender."

The governor said he was prepared to testify against VMI's single-sex policy in court and would support legislation in the General Assembly to force it to open its doors to women. He also held out the possibility of more drastic steps, including impounding state money intended for the school's operations or its legal defense.

As the state's top legal officer, Terry has represented VMI in a suit filed by the U.S. Justice Department in February. She said Wilder's latest statement could spell the end of her efforts. "I will work in concert with the governor," she said. "It's my job to help the governor achieve his aims."

The statements, separated by just two hours this morning, marked the virtual abandonment of high-level state support for VMI's men-only policy.

But supporters of the taxpayer-funded academy in rural Lexington vowed to continue their defense without compromise -- at their own expense if necessary.

Wilder said he changed his mind about speaking out after U.S. District Judge Jackson L. Kiser ruled in Roanoke earlier this month that the governor must remain a codefendant in the Justice Department's suit against VMI.

The Democratic governor denounced "those cynical people" who believe that his move off the fence is motivated by ambitions for national office. But virtually without exception, political activists in both parties said they believe Wilder's new stance is prompted by a fear of alienating potential supporters outside Virginia.

Nothing in Kiser's ruling earlier this month ordered Wilder to take a public stand, but the political cost of his silence was becoming more apparent. While attacking President Bush for failing to exert "moral leadership" on civil rights issues, Wilder has been criticized at home for sidestepping what for two years has been one of the most divisive issues in Virginia politics.

"The political motivations are so obvious they can hardly be denied," said Robert Holsworth, a political scientist at Virginia Commonwealth University. "This shows that Wilder is directing his gaze even more intently on the national arena."

"I was amazed at Doug's cynicism -- and Mary Sue managed to top him before lunch," said Steve Haner, executive director of the Republican legislative caucus.

Terry, a Democrat who has been lining up support for a gubernatorial campaign in 1993, also seemed eager to distance herself from the VMI case, which she said has had a high "political cost."

Although VMI's governing board is at odds with Wilder, Terry said, "Whenever there's a conflict, we represent the governor . . . . The governor is the principal architect of public policy in the commonwealth."

Like Wilder, Terry said she is open to an out-of-court settlement of the case, which a Justice Department spokeswoman also said is a possibility.

VMI leaders displayed no interest in that. "The VMI board continues to believe that this issue will be favorably decided by the federal courts," board President Joseph M. Spivey III said in a statement.

For both Wilder and Terry, the VMI issue from the beginning has presented a series of delicate political calculations. To many establishment Virginians, well-to-do and well-connected in state politics, preserving VMI's all-male history is an issue of considerable importance.

By contrast, more-progressive voters, particularly many women in Northern Virginia and other populous areas, are offended by what they see as a vestige of a social order that denies women a full role in society.

That political pressure has been made all the more exquisite by the fact that both the governor and the attorney general are themselves ground-breakers in the fight against discrimination -- Wilder the first black elected statewide in Virginia, Terry the first woman.

Lt. Gov. Donald S. Beyer Jr. also abandoned his silence on VMI today, saying he too favors the admission of women. He said he had not spoken out before "out of courtesy for the governor."

Terry, who has never stated a personal opinion about VMI's admissions, has defended its policy on grounds that Virginia provides such a wide variety of educational opportunities for women that they are not disadvantaged by being unable to attend VMI.

A private foundation affiliated with VMI has joined the legal battle against the Justice Department with a different line of reasoning: that VMI's system of education is unique and the admission of women would destroy its special mission.

Wilder said today he has not been impressed by that argument. "I have not seen the U.S. Army change its mission at West Point or the Navy {change} its mission" after women were admitted to those military academies.

John F. Banzhaf III, a George Washington University law professor critical of single-sex policies at VMI and the Citadel in South Carolina, said today's events leave the school's legal defense badly damaged. "They were close to zero before, and now, if anything, they're closer to zero," he said.

Robert H. Patterson Jr., a lawyer for the private foundation and a VMI graduate, said he remains optimistic, and charged that the issues in the case have been distorted by the news media and political interest groups.

The notion that VMI's system of hazing, rigorous exercise and dormitory life should remain a male bastion "is nothing more than plain common sense," Patterson said, though he worried that "maybe there is no room left in the American world for common sense or practicality."