Fairfax County and Virginia officials have agreed to pay nearly $100,000 in an out-of-court settlement to the family of a construction worker who died in 1978 after confinement in the Fairfax Jail and a state mental institution where his serious illness allegedly went untreated.

The settlement, believed one of the largest ever agreed to in a wrongful death suit in Northern Virginia, apparently will bring an end to the case of Donald P. Ferguson, a 28-year-old construction worker whose death led to two major investigations and once was a political issue in Fairfax County.

Howard Ferguson Sr., administrator of his dead son's estate, is scheduled to appear in U.S. District Court in Alexandria today to hear Judge Albert V. Bryan Jr. ratify the settlement, hammered out in meetings over the past several weeks.

Donald Ferguson was arrested Dec. 2, 1978 for failure to pay a $50 fine. During a four-day confinement at the county jail, his hands and feet were kept bound and his problems related to alcohol abuse and kidney malfunction went untreated, according to court papers.

He was then sent to Western State Hospital in Staunton, Va., where he was given aspirin and tranquilizers for falling blood pressure and a temperature that at times reached 105.6 degrees, according to the court papers. t

Ferguson died of kidney failure on Dec. 8, 1978, six days after his arrest.

The original suit sought $1.5 million. The settlement totals $97,500, according to Philip J. Hirschkop, attorney for the estate.

The Fairfax County Sheriff's Department has agreed to pay $25,000, the county government about $5,000 and Drs. Thomas Lee and Brian Hastings of Western State hospital about $50,000 according to an attorney in the case.

In addition, Hirschkop said, Fairfax County Medical Examiner Dr. Claude Cooper will pay $10,000, and another $5,000 will be paid by Coen C. Pasberg and Dr. William H. Grey, directors of the hospital.

All the money will be paid by insurance companies representing the defendants, Hirschkop said.

"We are very happy with the settlement," said Hirschkop. "We were prepared to go to trial, but we will take the settlement now for the sake of the family. The treatment Donald Ferguson received was an abomination."

One of the defendants in the suit was former Fairfax County sheriff James D. Swinson, whose department was in charge of the jail when Ferguson died. Hirschkop said Swinson refused to sign the settlement agreement. The attorney said he "didn't challenge his action because I got the money I wanted for my clients."

Swinson declined to comment yesterday. None of the other defendants could be reached.

Ferguson was black, and his death aroused the anger of many black citizens in Northern Virginia. In Fairfax it became a political issue, with calls for the resignation of Swinson. Swinson ignored the demands but did not seek reelection.

The first major investigation of Ferguson's death was undertaken in 1979 by a panel of Northern Virginia Democrats who concluded that Ferguson would not have died if he had been properly treated

The second major investigation was made by a board of inquiry authorized by Republican Gov. John N. Dalton. It concluded in late 1979 that there was no evidence that Ferguson was mistreated in the jail. "There is no indication," the board's report said, "that any physical abuse or inhumane treatment occurred while Ferguson was in the jail and that the level of medical and physical restraint use was appropriate to Mr. Ferguson's condition."