An agreement requiring the Virginia State Police to hire more blacks and women as troopers has been reached in settlement of a discrimination suit brought against the police by the U.S. Department of Justice.

In announcing the five-year agreement last night, the Justice Department said it is expected to result in blacks making up about 30 percent of those hired as troopers each year during its lifetime. Women are expected to make up about 25 percent of the new trooper hires.

Moreover, the consent decree, signed Wednesday by a federal judge to settle a six-year-old discrimination suit, stipulates that as much as $187,500 be paid to as many as 75 blacks who, according to Justice, were rejected as troopers as the result of discrimination.

In the decree, the state police, while denying that it has engaged in discriminatory practices, agreed to make a good faith effort to recruit the blacks and women from among the applicants meeting initial standards.

The decree also calls for nondiscrimination in hiring of blacks in civilian posts with the state police, and requires the state police to modify its written test to assure nondiscrimination. Blacks disqualified by the written test used from 1972 to 1976 will be allowed to reapply under the new standards and blacks disqualified by the test used since August 1978, and who would qualify under the new standards, also may reapply.

The agreement, signed by Justice and by State Attorney General Gerald L. Baliles, does not require the state to hire persons who are unnecessary or unqualified, nor to give preference to less qualified over more qualified persons.