A discrimination suit filed by a group of white males that blocked for two weeks the start of a class for new Montgomery County police recruits was settled yesterday before it went to trial.

The settelement, approved by County Circuit Court Judge Joseph M. Mathias, clears the way for the class to start Tuesday.

As a condition of the settlement, five white male candidates will be added to the rookie class, which already consisted of 15 white males, seven black males and eight women.

The white males who filed the $40 million civil suit claimed they were unfairly treated when they were eliminated in a lottery that was not required for the minority and women candidates.

The settlement defused a potentially volatile and lengthy court confrontation over the county's hiring methods and its efforts to boost the number of women and minority group members in the police department, which was exclusively white and male until 1968.

Police Chief Bernard D. Crooke yesterday picked the five additional candidates from the 60-man pool of white male candidates who were classified as "outstanding" but were eliminated by the lottery.

The remaining white male applicants who made "outstanding scores on tests will be given priority consideration for future recruit classes over the next two years, subject to the county's affirmative action plan.

"It's a victory for us," said John Walsh, attorney for the group of white male candidates called COPPS (Candidates Opposed to Present Policies and Standards).

The settlement was reached after four days of negotiations between the group and county officials. There was no determination whether the county's use of a lottery violated its own laws that require hiring based on merit.