Former national GOP co-chairman Richard D. Obenshain and former Navy secretary John Warner were locked in a close contest for the Republican U.S. Senate nomination in Virginia last night after three ballots at the state convention and the withdrawal of former Gov. Linwood Holton from the race.

Holton gave up his quest for the Senate nomination after watching his first ballot vote total of 780,34 fall 30 ovtes on the second ballot and 130 on the third.

He withdrew with a promise to the delegates to support the nominee they chose and retired to the Fairfax County delegation to take his place as a voting delegate. He would not disclose how he would cast his ballot nor did he encourage his supporters from the podium to throw their votes to one or the other of the two leaders.

Obenshain led and Warner was in second place from the first ballot. After three roll calls, Obenshain had 1,337.60 votes to 996,47 for Warner.

This left the frontrunner almost 204 votes short of a convention majority and Warner almost 545 votes short of a majority.

The fourth candidate in the race, state Sen. Nathan H. Miller of Rockingham County, still held onto 121.91 votes after the third ballot.

Warner faced a formidable hurdle as the fourth ballot began. He needed to win almost three votes for every one that went to Obenshain from Holton supporters and continuing defections from Miller. Obenshain campaign consultant Robert Weed claimed, and some neutral party figures agreed, that Obenshain should get at least one Holton-Miller vote for every two that would go to Warner.

As the roll calls progressed, Obenshain increased his total on the second ballot by 69 votes and Warner raised his by 55. On the third ballot Obenshain moved up 77 votes and Warner 89.

Campaign staff members said that both Warner and Obenshain managers may have instructed some of their delegates to vote for Miller and Holton on the first ballot and then switch to their real preference on the second to ensure a second-ballot vote increase.

In the pyschological warfare of a swiftly moving convention, it is considered essential to show at least a small vote growth on each ballot.

Neither Warner nor Obenshain managers would admit to "stashing" votes in the Holton and Miller columns on the first ballot.

The GOP nomination was being decided by what is believed to have been the largest political convention ever held in the United States. About 7,500 delegates voted patiently in the Richmond Coliseum, completing roll calls in about two hours.

After Holton lost 30 votes on the second ballot some of his supporters grew restless. Only a personal appearance by the former governor before the Norfolk delegation - a Holton stronghold - may have prevented erosion of his support there on the third ballot.

As it was, Holton maintained a large majority there, getting 88 votes, while Warner picked up two for a total of eight and Obenshain picked up one, for two.

Albert J. Teich Jr., chairman of the Norfolk delegation and a Holton supporter, said Holton's grip on that big block of votes would disappear "if there is a significant weakening" on the third ballot. Teich would not predict who would benefit from the switch except to say "It won't be Obenshain."

The Warner forces surveyed the second ballot results, which showed him gaining 55, compared to a net gain of 65 by Obenshain, and swung into a third ballot strategy.

Warner took off his coat, loosened his tie, stopped to give his wife what had become the obligatory public embrace, and headed for the Arlington delegation. There he snapped his red and black suspenders, grapped shoulders and whispered in ears.

As it became obvious that every vote could be critical, a black caucus was hastily put together by a black aide to Warner.

After two ballots, no one knew how many blacks were at the conventions or how many votes they held, but Warner's forces set out after them. They summoned a meeting of the black caucus via a handbill that had been printed by Warner volunteers within minutes of the second ballot.

The balloting followed almost two hours of nominating speeches and demonstrations.

Former Gov. Mills E. Godwin, a long-time power in conservative Democratic politics who became a Republican while Obenshain was state GOP chairman, nominated Obenshain and called him "the principal architect of the winning coalition" of Republicans and conservative former Democrats who had elected Republicans to statewide offices in Virginia for the past 10 years.

Godwin's endorsement of Obenshain three days before the nominating session gave a psychological boost to Obenshain's campaign as the convention neared, but was uniformly discounted by opponents as merely a public confirmation of what was long presumed to be Godwin's preference.