Virginia Del. Mary Sue Terry, touting her experience as a prosecutor, small town banker, farmer and her seven years in the General Assembly, formally entered the race today for the Democratic nomination for attorney general.

Standing on the neatly swept loading dock of a farm store and mill that has been in her family for 100 years, Terry told about 250 persons in this rural community south of Roanoke that "a safe society must be the bedrock" of government.

Terry, 37, a Patrick County lawyer best known in the state for sponsoring legislation to strengthen the state's drunk-driving laws, has informally campaigned for more than a year and already has raised nearly $300,000 in what she said may be a $1 million campaign.

One of only a few women ever to seek statewide office in Virginia, Terry is expected to be the only candidate for her party's nomination at its June convention in Richmond. If elected she would be the first woman to hold the office in Virginia. She has drawn support from a broad range of business interests, including supporters of Democratic Gov. Charles S. Robb.

Republican Del. W.R. (Buster) O'Brien of Virginia Beach, who announced on Monday, is expected to be the GOP nominee.

"There is only one candidate with a proven record of leadership," Terry said as the crowd munched on warm ham and biscuits and drank hot coffee outside Cooper's Mill, which sits near the family hog pens.

"It was here I took my first job," Terry said of the store, where at the age of 6 she sold dog food and rat bait on commission.

Surrounded by numerous relatives, Terry sought to blunt what her advisers say are efforts by her critics to play up the fact that she is a single woman.

She began her speech with an introduction of her parents, two sisters, their husbands and children. "So much of who I am is wrapped up in this farm," Terry said, and "so much of who I am is my family."

O'Brien, during his anouncement, was surrounded by his wife and three children and said he would campaign on "traditional family values." O'Brien said he opposes abortion, while Terry said she is pro-choice, except for minors.

"I agree with him on those values," Terry told reporters today.

Some Democrats are fearful that Terry, despite her qualifications, may be hurt by leftover unfavorable perceptions in Virginia of two women candidates last year, Democratic vice presidential nominee Geraldine Ferraro and Edythe C. Harrison, who was trounced in her bid to unseat Republican Sen. John W. Warner.

"I think it's pretty obvious we have different styles and philosophies just as male candidates [do]," Terry said before leaving on a traditional swing around the state.

Terry, unlike Harrison, has moved to shore up support among some of the state's most influential politicians, including two key Robb fund-raisers, Del. Alson H. Smith Jr. of Winchester, chairman of the House Democratic Caucus, and Alexandria lawyer and lobbyist William Thomas. She also has hired veteran Washington media consultant Robert Squier, who directed Robb's winning 1981 campaign, to handle her campaign.

Today, Terry was introduced by House Speaker A.L. Philpott (D-Henry) and also won the public backing of 5th District Rep. W.C. (Dan) Daniel of Danville, who has never endorsed a state candidate.

She also has played down any effect she expects on her campaign from the potential nomination of state Sen. L. Douglas Wilder (D-Richmond) as the party's nominee for lieutenant governor. "I've been running my own campaign," Terry told reporters. "I will run with integrity with any ticket the party selects."

Terry, a general practice lawyer in Stuart, is a graduate of the University of Richmond and the University of Virginia Law School. She was appointed and served four years as an assistant commonwealth's attorney in Patrick County before being elected to the House of Delegates in 1977.

Gerald L. Baliles, the current attorney general who also is from Patrick County, is seeking the Democratic nomination for governor this year.