Virginia Democratic Lt. Gov. Richard J. Davis, locked in a hard-fought battle for his party's nomination for governor, emerged with a slim lead today over state Attorney General Gerald L. Baliles in statewide delegate selection caucuses.

But scattered returns from Northern Virginia indicated that Baliles may have won enough support there to have blocked Davis from claiming the nomination. That should give Baliles an advantage Monday night during a second round of caucuses in largely rural sections of Virginia.

Davis, 63, a former mayor of Portsmouth, today swept the Norfolk area while Baliles, 44, did the same in his home area of Richmond.

Late tonight as the Baliles forces heard that had won several large areas of Fairfax County, David Doak, a top Baliles aide, claimed "It's a major breakthrough."

Baliles himself stopped short of claiming victory early this morning. He said in an interview that Davis won't be able to win the votes he needs for the nomination during the second round of caucuses Monday night.

He said, however, that he expected to win enough delegates then to claim the nomination. "I don't take any area for granted," Baliles said. "I want to make sure our folks turn out."

The mood in the Davis headquarters late last night was subdued, a contrast to earlier claims of success. "We've held our base," said Tom King, Davis's campaign consultant, had said. "He's held his base. Our base is bigger."

Baliles said, however, that he had done better than expected in the Washington suburbs and that was the key to the results last night.

Both sides had said they expected the outcome to hinge on results from the Washington suburbs, one of the most heated battlegrounds in the nomination fight.

The turnout in Fairfax County was twice as high as in last year's presidential caucuses, forcing officials there to dispatch additional ballots hurriedly to meeting sites. Davis won Arlington, Prince William and Stafford counties and Fairfax City. Baliles carried Falls Church and Loudoun County, but the turnout throughout the region was so high that officials last night were still counting the results in other Northern Virginia jurisdictions.

Davis was reported to have won Fairfax's Lee, Mason, Dranesville and Mount Vernon districts, but Baliles won the Annandale, Springfield and Centreville districts. The race was said to be close in other areas of Fairfax.

Northern Virginia accounts for about 720 of the party's 2,300 delegates that were to be selected in today's caucuses. Another 1,200 delegates will be chosen in mostly rural areas of the state Monday night. The party's nominating convention is June 7 in Richmond. A candidate must win 1,802 delegates for nomination.

The winner will face either Richmond lawyer Wyatt B. Durrette or Rep. Stan Parris of Fairfax, who are battling for the Republican Party's nomination. It will be decided at a convention in Norfolk May 31 to June 1.

Baliles campaign officials had said they thought they had a good chance to take two hotly contested areas, Roanoke and Virginia Beach. However, they won only Roanoke.

The Baliles campaign organization said today it hoped to cut into Davis' acknowledged strength in Northern Virginia in order to remain in striking distance for Monday night's meetings, where Baliles is considered the front-runner.

Early returns showed Davis holding a slim lead over Baliles, according to the Virginia Democratic Party, which said Davis had 902 votes to 792 for Baliles. There were only 43 persons elected as uncommitted delegates in the early returns.

Davis supporters said today they expected their candidate to increase his lead as returns from the Washington area were counted.

Northern Virginia Democratic Party officials reported heavy turnouts throughout the afternoon at area schools that served as polling sites.

In addition to the governor's race, the Democrats cast ballots in two other campaigns; state Sen. L. Douglas Wilder of Richmond was running unopposed for lieutenant governor and state Del. Mary Sue Terry (D-Patrick) was unopposed for attorney general.

The early results showed that many Democrats throughout the state were refusing to commit their votes to Wilder and Terry and were filing as uncommitted.

The expected selection of a woman and Wilder, who is black, on the Democratic ticket this fall has stirred controversy among some party officials who say it may appear too liberal to win in mostly conservative Virginia.

Davis and Baliles, each of whom have spent nearly $1 million in their hard-fought nomination fight, have campaigned actively for more than a year, crisscrossing the state to line up supporters for this weekend's caucuses.

As the caucus date neared, the campaigns traded increasingly sharp and sometimes bitter charges that some Democrats said may strain party unity even after a clear winner emerges.

During a series of debates that concluded only this week in North- ern Virginia, Baliles traveled to Davis' home town of Portsmouth to attack Davis' record there as mayor, a move that surprised and angered the Davis campaign.

And during one joint appearance in Richmond, Davis caustically said he was sorry that Baliles apparently "couldn't read" after Baliles criticized Davis' issues pamphlet.

Davis accused Baliles of taking stands both for and against the Equal Rights Amendment and environmental issues and promoted himself as a "consistent" Democrat not afraid to take stands on controversial issues.

Although the caucus system essentially is an organizational battle that emphasizes strength within the party rather than issues, Baliles and Davis differed sharply on abortion.

Baliles said flatly that it was a woman's right to choose whether to have an abortion and said he would have vetoed legislation that narrowly failed in last winter's General Assembly session that would have required unmarried women under 18 to get permission for an abortion from either their parents or a juvenile court judge.

Davis said that though he was personally opposed to abortion, he supported the right of women to choose. However, he said he would have signed the restrictive legislation, which is expected to be brought up again next year.

Abortion could emerge as a major issue in the fall campaign against the Republicans. Both Republican candidates for governor, Richmond attorney Durrette and 8th District Rep. Parris of Fairfax County, have said they oppose abortion, want to reduce state Medicaid spending for abortions and favor the restriction on minors.

Organizers for Davis and Baliles say the attorney general's stand on abortion boosted his strength in Northern Virginia.