A federal judge in Alexandria ruled yesterday that Virginia’s colleges and universities may deny admission to illegal immigrants — a ruling that experts said was the first of its kind in the nation.

The decision by U.S. District Judge T.S. Ellis III came in a lawsuit filed against seven Virginia schools accused of violating the rights of the immigrants by refusing them entry.

“It is clear that denying illegal aliens admission to public colleges and universities simply removes another public incentive for illegal immigration,” Ellis wrote. He stopped short of dismissing the case, however, ruling that it could proceed to trial because the plaintiffs have a right to try to prove whether the schools are using federal standards to identify applicants who are in the country illegally.