Virginia Attorney General Gerald L. Baliles, propelled by a near sweep of rural delegate selection caucuses last night, claimed victory early today over Lt. Gov. Richard J. Davis in their hard-fought race for the Democratic gubernatorial nomination.

"The underdogs of Villanova and Jerry Baliles had the . . . reality of victory," Baliles said, referring to Villanova's upset basketball victory over Georgetown University.

Davis, at his home in Portsmouth, declined to talk with reporters and issued a formal statement in which he said "it would be premature for anyone to claim victory at this point."

Baliles, who trailed Davis by more than 400 votes in the first round of caucuses on Saturday, surged ahead last night by sweeping areas even thought to be Davis' strongholds.

According to the Virginia Democratic Party, Baliles tonight had a total of 1,649 votes, 154 short of the 1803 he needs to win at the party's June 7 nominating convention in Richmond.

Baliles, speaking to reporters at the John Marshall Hotel here, said he had secured the support of more than 70 uncommitted delegates and 43 state legislators who are automatic delegates to the convention. Baliles said he also expects to receive enough of more than 81 delegate votes that had not yet been reported to put him over the 1,803 total.

Davis' statement said he would meet with his staff to review the numbers from last night's caucuses, but many party officials said the former Portsmouth mayor, considered the front-unner for much of the past year, appeared to have suffered a significant setback tonight.

Davis aides at the John Marshall Hotel party headquarters glumly tallied their votes and vowed to challenge Baliles' claim of victory in the campaign for the nomination to succeed Democratic Gov. Charles S. Robb, who is prevented by the state constitution from succeeding himself.

The Baliles lead was a dramatic turnaround from Saturday when Davis, 63, rolled up 400-vote lead in mostly urban areas that had been expected to favor Davis who was elected lieutenant governor in 1981.

A total of 3,500 delegates were to be elected during the two days of caucuses, with 1,114 being selected last night.

Baliles, 44, considered the more conservative candidate, was given the edge going into last night's caucuses, scattered throughout mostly rural areas.

In addition to the 3,500 elected delegates, there are another 104 so-called automatic delegates who do not have to be elected. They are the 97 Democratic members of the General Assembly, the state's four Democratic congressmen, as well as Davis, Baliles and Democratic Gov. Charles S. Robb.

Under that formula, party officials said there will be 3,604 delegates at the convention.

Both campaigns have predicted that one of the candidates would emerge from the caucuses with enough votes to claim victory.

Meanwhile, the Baliles campaign was considering challenges of Saturday's results in Fairfax County, where Baliles narrowly lost in the Providence and Dranesville districts. In addition, Baliles' aides said they may challenge what they said was a close vote in Arlington, where Davis won all 126 delegates.

Davis' aides dismissed Baliles' questions over the vote and suggested it was a sign that Baliles was less confident of victory statewide than his advisers have suggested.

In other balloting last night, State Sen. L. Douglas Wilder of Richmond, who was unopposed for the Democratic lieutenant governor nomination, claimed victory with more than 2,000 delegate votes. Wilder's strong showing indicated enough strength to turn back efforts to some party leaders to draft an alternative candidate.

Aides to State Del. Mary Sue Terry of Patrick County, who was unopposed for the attorney general nomination, said she also captured the votes she needed.