INDIANAPOLIS (AP) _ The court-ordered busing of inner-city black students to schools in outlying townships will be phased out over the next 18 years under an agreement reached between the state, the federal government and local schools.

U.S. District Judge S. Hugh Dillin on Monday accepted the agreement to phase out the 1981 desegregation order that once sent 7,000 black students from Indianapolis to schools outside the city.

More than 5,000 black students are still bused to schools in Decatur, Franklin, Lawrence, Perry, Warren and Wayne townships.

``Today is a historic moment that will allow integration to continue and step forward,'' said Indianapolis Mayor Stephen Goldsmith, who has long pushed to end the order. The city school district had sought an end to the order.

Part of the agreement is an effort to make affordable housing more accessible in Marion County. The Indianapolis Housing Agency will establish a center to offer counseling and home ownership and mortgage plans.

The logic is that if the residential areas in Marion County are diversified, the educational system will be as well.

The agreement lets a township begin phasing out transfer students once the school district's resident black population is more than 20 percent. If they don't reach that percentage by the 2004-05 school year, the phase-out will begin anyway.

The process itself will take 13 years, the period it would take a child to go from kindergarten to high school graduation. No student currently attending a township school would be sent back to the city school system.

The plan also will save the state money. City school officials estimated the state has spent more than $18 million on busing.

City and township school officials said the busing program served its purpose.

``I would say that Perry Township has changed substantially in terms of acceptance of diversity,'' said Douglas Williams, township superintendent. ``I don't know if that would've happened without court-ordered busing.''

John Moss, an attorney who represented Indianapolis' black students in the original case, said he was cautiously pleased.

``We have a plan here that promises realistically to work,'' Moss said. ``But like any plan, it has to be pursued aggressively.''