Voters in Prince George's County gave the go-ahead yesterday for the building of a new $40 million jail which county officials said would greatly relieve overcrowding and cut down on the number of inmate rapes and other sexual assaults.

Officials praised the voters' decision to approve a $20 million bond issue to help finance construction of the jail.The vote, with two-thirds of the precincts reporting, was almost 4 to 1 in favor of the bond issue.

"It's heartening to know the people of this county realize that the penal system needs the necessary resources to maintain public safety and the safety of inmates and staff," said jail spokesman Jim O'Neill.

County Circuit Court Judge Vincent Femia said he believes the new jail will help reduce the number of sexual assaults occuring among inmates. Rapes and sexual assaults occur as frequently as 12 times a week, according to guards and inmates quoted in a recent series of articles in The Washington Post.

Approval of the bond issue, Femia said last night, "proves that once people know what's going on, they'll do what's necessary to stop [sexual assaults]. Getting the jail built will help us stop all that nonsense. We'll be able to separate the violent [inmates] from the non-violent and divide the guilty from the innocent."

There was little debate on whether to build the facility. Rather, there were those who said it was necessary -- including judges, lawyers and relatives of inmates and former inmates -- and residents of the area in which the facility is planned who said they didn't want it in their neighborhood.

The proposed site is on Brown Station Road in Upper Marlboro, several miles from the present jail near the courthouse.

County officials committed themselves to building a new jail in September, when they signed a settlement agreement in a lawsuit that alleged overcrowding in the existing facility.

Rejection of "Question B" still would have left the county liable to build a new jail, according to terms of the settlement before U.S. District Court Judge Frank Kaufman. The judge could have forced the county to use $20 million from property taxes or other county sources to build the jail, according to a lawyer involved in the case.

Under terms of the ballot question, the state will contribute $20 million toward the construction to go with the $20 million raised in bonds. Principal and interest on the bonds, amounting to about $3 million a year for 15 years, will come from property taxes.

The new jail will house 300 inmates and will be ready for occupancy by Sept. 30, 1985. It will replace a dilapidated wing of the present county detention center, which was constructed in 1936. The net effect will be an increase of 200 beds.

Even with a new jail, the detention center might still experience overcrowding. Plans called for space for 377 inmates -- 300 in the new jail and 77 in the new wing of the current jail. The present county jail population is about 400 inmates, but it has been as high as 600.

The present jail was built to house 177 inmates. About 70 percent of them are awaiting trial. Partly because of the overcrowding problem, numerous rapes and sexual assaults occur in the jail, according to guards and inmates.

Overcrowding contributes to sexual assaults because it increases tension among inmates, according to jail guards. In addition, overcrowding makes it difficult for jail officials to separate inmates who are vulnerable to rape -- in many cases, those charged with misdemeanors -- from those likely to rape, many of whom are charged with violent crimes. The jail two weeks ago temporarily solved the latter problem by constructing an annex for inmates charged with misdemeanors.