DANVILLE, Ill. (AP) _ Two black candidates won election to the city council Tuesday as voters in this eastern Illinois city ended all-white rule of local government in an attempt to settle a voting rights lawsuit.

''I am elated,'' said Lester Brown, 49, an accountant and one of two black aldermen elected in the city's 1st Ward.

''Most of the people in my ward feel they finally have someone who represents their interest,'' Brown said.

With all six precincts reporting, Brown got 555 votes. Eugene Thompson, 61, who is retired, won the other seat with 470 votes. Ron Riess, the only white candidate, was third with 435 and Jerry Collier followed with 278.

The other two black aldermanic candidates - Tracy woods in the 3rd Ward and Lloyd Randle in the 4th Ward - finished last in their races.

In citywide contests, Vermilion County Treasurer Bob Jones defeated bakery owner Gerald Arnholt 5,430 to 4,291.

Herbert Hales Jr., a white candidate, defeated Gayle Brandon, who is black, 5,091 to 2,672, in the race for city treasurer.

But even though black candidates did not win all their races, they called it a ''historic day.''

''It means we will have the opportunity to have direct representation in city government,'' said the Rev. Roosevelt Davis, one of seven black plaintiffs in a federal voting rights lawsuit. ''Things are working out the way we thought they would.''

The city is to shift Saturday from the old commission form of government, with City Council members elected at large, to a mayor-aldermanic system, with council representatives elected from wards, a change aimed at ensuring black representation.

As the polls closed, election officials gathered ballots and said reports from around the city suggested a good turnout.

''This is a good day for the city of Danville,'' said Jones. ''The change in government will get us all working together for better times. People want cooperation.''

---

Under the mayor-commission form of government in place for 60 years, no blacks served on the City Council although they make up 16 percent of the population of 39,000.

The election was part of the settlement of the lawsuit filed in January by black residents, who argued the commission form of government diluted minority voting strength.

Springfield had just lost a similar case when the Danville settlement was worked out by plaintiffs and city officials, and approved by U.S. District Judge Harold Baker in February.

But it stirred controversy because it included a provision allowing Mayor Wilbur Scharlau and city commissioners Ray Randall, Jerry Brown and Ernie Cox to remain on the payroll as executive department heads for three years.

Their attorney said that would ensure a smooth transition to the new form of government, but others criticized the plan on grounds that the city did not need to keep the men on the payroll that long.

Scharlau and the commissioners, along with city attorney Wendell Wright, were indicted on criminal charges stemming from the settlement. Vermilion County State's Attorney Craig DeArmond said the way they negotiated the job- guarantee provision was illegal.

Baker issued an injunction last month blocking prosecution of the five officials. DeArmond says he will appeal.