The hostility had been simmering for weeks. It exploded the day the foreman strode onto a Fairfax County construction site wearing a white hood and cracking a bullwhip.

"My ancestors had slaves," bellowed the white foreman, snapping the whip in the direction of the black worker. "And they knew how to keep them in line."

The foreman called it a big joke. The black worker called it racial harassment. The Fairfax County Human Rights Commission called it job discrimination and launched a case against the construction company.

The complaint was resolved earlier this year when the worker won a $9,000 settlement from the company and a place in a carpentry training program he had been denied for more than six months, according to commission records.

That case was one of 175 filed with the Human Rights Commission in fiscal year 1981, which ended July 1, according to the commission's annual report released two weeks ago. Of those cases, according to the report, 157 involved alleged employment discrimination, a 38 percent jump over the previous year's figures.

And while racial discrimination cases accounted for almost half the employment complaints filed, the commission recorded a substantial increase in cases involving alleged discrimination against pregnant women, sexual harassment and age discrimination, according to Patricia Horton, commission executive director.

Case records of the Human Rights Commission tell the dramatic stories behind the dry statistics:

The restaurant owner who fired a pregnant waitress because she didn't fit the "image" of his establishment.

The automobile dealer who dismissed the pregnant saleswoman because customers felt "uncomfortable" with her in the car during demonstration rides.

The security guard who quit her job after accusing her boss of sexual harassment. The company stood behind the boss until the woman filed a complaint and produced sexually suggestive cards and letters she said the man had sent her. A subsequent investigation by the Human Rights Commission, according to commission records, showed that at least three other women at the company had been the victims of sexual harassment by the same supervisor. One was fired after she complained to company administrators.

All three cases, according to Human Rights director Horton, were settled in favor of the complainants. One incentive for the out-of-court settlements, particularly for employers, Horton said, is a guarantee of anonymity. During the past fiscal year, the commission won $156,520 in settlements for complainants, the fourth highest settlement amount in the nation.

Of the 101 cases completed by the commission, 54 percent were settled in favor of employes filing the complaints, according to the commission's annual report. And those settlements included 19 cases of sexual harassment or discrimination against pregnant workers, Horton said. During the previous year, only one complaint of sexual harassment was filed with the commission.

The commission's report also notes other trends in the human rights field. Employment cases have tripled in the past four years, and allegations of age discrimination have shifted from young people being denied housing to older persons complaining of job discrimination, according to the commission's annual report.

Horton attributes the increased number of complaints, particularly in the areas of job discrimination and sexual harassment, to the proliferation of federal laws and court decisions that have more precisely defined what constitutes discrimination in those areas.

"In the past, most employers never thought sexual harassment was illegal," said Horton, who added that two years ago a federal court of appeals established the legal guideline opening the way for official action on sexual harassment cases.

The commission also reported a drop in settled cases in one area: housing discrimination. This year, according to the annual report, seven housing complaints were settled by the commission, compared with 19 for the previous year. The commission report attributed much of the decrease to the recent slowdown in the housing industry. It also handled five cases alleging discrimination in public accommodations.

And commission records note that although cash awards made up the bulk of its settled cases, several complaints resulted in remedies other than money awards.

In one case settled by the commission, a Fairfax jewelry story was accused of barring blacks. In its investigation, the commission sent black customers and white customers to the shop. In all but one instance, the black customers were denied entrance to the store, according to commission reports.

One black man not only was stopped at the entrance, "but was asked to move aside to allow a white person to enter the store," the report said.

The owner, according to commission reports, had contended that he was only allowing regular customers in the store because of security problems. But when shown the results of the test, the owner agreed to security measures developed with the cooperation of county police and the commission staff to ensure that race would not be the basis for admitting customers.

In another case, a black woman accused a beauty shop of race discrimination after she said she was charged a higher fee for a haircut than white customers. The beauty shop settled the claim by giving the woman a free haircut.

The Office of Human Rights, established in 1975, operates with a staff of six full-time and two part-time employes. It is funded jointly by the County of Fairfax and the federal Equal Employment Opportunity Commission.

The commission has jurisdiction over allegations of discrimination against all employers in the county except the county government and the school board.