A program allowing high school graduates from the District to pay in-state tuition rates at colleges outside the city would be limited--at least initially--to colleges in Maryland and Virginia, under an agreement endorsed yesterday by congressional leaders and D.C. officials.

The agreement, reached as the U.S. Senate is considering the measure, amounts to a scaling back of a similar plan that passed the House and would have allowed D.C. students to get in-state tuition rates at universities across the nation. The Congressional Budget Office said that plan was full of loopholes that could expand the cost of the program well beyond the $17 million the White House set aside for it in next year's federal budget.

Under the compromise, the District could award up to $10,000 a year--and up to $50,000 in total--to high school students from the District who attend public universities in Maryland or Virginia, beginning either in January or the next fall. The District's mayor would have the authority, in consultation with Congress, to give such grants to students attending public colleges outside the region.

But under the agreement worked out by Sen. George V. Voinovich (R-Ohio) and his staff, the city would need to document that the student was unable to gain entrance to a Maryland or Virginia school because of the limited number of slots available for out-of-state students and that there was money available.

D.C. students attending private schools also could benefit from the program but under more restrictions. Those who enroll in private colleges in the District, Fairfax, Arlington, Montgomery and Prince George's counties or the cities of Fairfax, Alexandria or Falls Church could get as much as $2,500 a year, up to a total of $12,500.

The plan, which is scheduled to be voted on today by the Senate Governmental Affairs Committee and possibly will be passed by the Senate as soon as Friday, is part of a continuing effort in Congress to improve educational options for D.C. students. Unlike their peers elsewhere, high school graduates who live in the District have not been able to enjoy the low costs of attending a network of state-supported colleges.

City officials and Rep. Thomas M. Davis III (R-Va.), the original sponsor of the bill, had wanted the program to apply to public colleges across the nation. But with the Clinton administration and some senators objecting to the potential costs of that plan, Davis and D.C. officials compromised.

"It isn't what we asked for . . . but it is a reasonable approach," Davis said. "The things that are important in the bill are still there."

Some details remain to be worked out, Del. Eleanor Holmes Norton (D-D.C.) said late yesterday, "but the remaining problems are easily enough resolved that we see no reason the bill should not" move forward.

The program, administered by the D.C. mayor's office with audit oversight from the U.S. Department of Education, would be open to families at all income levels. But if the demand for tuition assistance exceeds the available funds--$17 million in the first year--the mayor would have the power to reduce the value of the grants given out by his office.

Those attending a meeting on the tuition bill yesterday--including representatives from the Clinton administration, the House and the Senate--also agreed to modify how "residency" is defined to prevent potential abuse of the grant program, staff members said.

Under the revised plan, students entering their freshman year of college must have lived in the District during the year before their enrollment to receive money from the tuition program. Applicants must enter college within three years of graduating from high school--with certain exceptions for military or Peace Corps service--and they must not previously have received an undergraduate degree.

Students in the program must have graduated from high school on or after Jan. 1, 1999, meaning that when the program goes into effect next year, only college freshmen and sophomores would be eligible.

Norton said this is one of the provisions that she and Mayor Anthony A. Williams (D) oppose, adding that it makes no sense to exclude older students who face the prospect of dropping out of college because of the costs.

"This is going to be a howl from parents all over the District saying, 'How come we were left out?' " she said.