Virginia state police are investigating the alleged bribery of two elected officials in a road dispute handled by the Patrick County law firm of state Del. Mary Sue Terry, the Democratic candidate for state attorney general, a state official said yesterday.

David Hathcock, a spokesman for the state attorney general's office, said the investigation does not "in any way" involve Terry, but is focusing in part on Terry's law partner, Richard D. Rogers Jr. He said a search warrant was carried out recently by state police for records held by Rogers at the two-member firm's office in Stuart, Va., and that some of Rogers' records were seized.

Aides to Terry's Republican opponent, Del. W.R. (Buster) O'Brien of Virginia Beach, said yesterday: "It appears some very serious questions are being investigated. It would not be appropriate to discuss the specifics, but we do feel that any attempt to keep this investigation secret would not serve the public's interest."

At Rogers' request, court papers in the case were ordered sealed on Oct. 7 by Patrick County Circuit Court Judge Frank I. Richardson Jr. The judge refused a request by Rogers yesterday to lift the seal after news of the investigation surfaced.

John Jameson, Terry's campaign manager, said the Terry camp learned of the investigation Oct. 4, the day of her only TV debate with O'Brien, and that Rogers conferred with Terry before seeking to have the court record closed. "She said she'd back him up with that," Jameson said.

Jameson said Rogers "wanted a grace period to balance what he felt was a one-sided file." The aide said Terry now wants the file opened and will "take the necessary actions to do that."

The dispute involved a little-used county road crossing a 12,000-acre tract in southwest Patrick County belonging to PrimTimber, a firm owned by a wealthy Frenchman, Didier Primat.

The county Board of Supervisors denied Primat's request in 1982 to close the road to keep out hunters and vandals.

In a second vote last spring, the board reversed itself and ordered the road closed.

Rogers represented the firm before county officials during the second hearing on the issue.

Jameson said the Terry campaign returned last weekend a $5,000 contribution from Primat made in August of last year "to avoid any appearance of impropriety."

He said Terry had performed some title work in connection with the property, but never appeared before the board.

According to Hathcock, Patrick County prosecutor Anthony Giorno informed the state attorney general's office in June of allegations by an unnamed citizen that a local official had been offered a bribe to sway his vote on the road in 1982.

The unidentified citizen said he believed a second elected official had been bribed by the same person before this year's vote on the road, Hathcock said.

He said the attorney general's office told Giorno on June 27 that the allegations lacked sufficient information and suggested that he obtain a sworn affidavit from the citizen.

Hathcock said Attorney General William Broaddus authorized the investigation by the state police on Sept. 18 after receiving the affidavit.