American voters yesterday put a caution sign in the way of President Reagan's effort to redirect American government onto the conservative track by bolstering the strength of his Democratic opposition in Congress and powerfully reinforcing it in the state capitals.

But Republicans held onto their Senate majority, limited Democratic gains in the House to about 20 seats and even softened the loss of key governorships by regaining Reagan's old office in Sacramento. Their losses at the end of the evening were less severe than they looked early in the count -- or than might have been expected in a time of high unemployment.

Democrats took over governorships from the Republicans in Texas, Arkansas, Michigan, Minnesota, Nevada, Ohio, Nebraska and Wisconsin, while losing in California and New Hampshire, for a net gain of six state capitals. Their gains were particularly striking in the upper Midwest and will be a source of strength in the 1984 presidential elections.

But there was a recount situation in New York, where millionaire Lewis E. Lehrman (R) was challenging Democratic Lt. Gov. Mario M. Cuomo's apparent victory. In California, Los Angeles Mayor Tom Bradley (D), trying to become the first elected black governor, was defeated by state Attorney General George Deukmejian (R).

And in a surprisingly close race, Illinois Gov. James R. Thompson (R) was trailing former senator. Adlai E. Stevenson III by a dwindling margin as the vote count neared completion.

By early today, with only a close race for the Democratic seat in Nevada to be settled, Democrats had made a net gain of one seat in the Senate. They picked up seats in New Jersey and New Mexico, but lost Virginia to the Republicans. Republicans were assured of continued Senate control, and could hold their present 8-vote edge if challenger Chic Hecht (R) beats Sen. Howard W. Cannon (D) in Nevada.

San Diego Mayor Pete Wilson (R) defeated California Gov. Edmund G. (Jerry) Brown Jr. (D) in the standout California Senate race, keeping that seat in the Republican column.

The makeup of the House of Representatives was more uncertain, but indications were that Democrats would gain about 20 seats, perhaps enough to shake the Republican-southern Democratic conservative coalition that gave Reagan his string of budget, tax-cut and defense-spending victories over the past two years.

House Minority Leader Robert H. Michel (R-Ill.) was leading in a close battle for survival in his high-unemployment Peoria district and early today claimed victory.

The most endangered Democratic powerbroker in the House, Rep. Phillip Burton of California, also had a narrow lead, with about one-quarter of the vote counted.

The White House insisted that retention of the Senate majority would enable the president to pursue his program of domestic spending cuts and bolstered defense spending, but conceded it would be "tougher" going against the enhanced Democratic majority in the House.

Summarizing yesterday's gains for the Democrats, Rep. Morris K. Udall (D-Ariz.) said that Reagan "could do no wrong" the past two years, "but now he'll consult with the House. President Reagan is going to have to come to us."

Referenda on a nuclear freeze were carrying in seven of the nine states where they were on the ballot, adding another disappointment to the White House woes.

While many House races were very close and some in the western states remained to be counted, it seemed likely at one point that the Democratic gains would go past 20 seats and approach the 30-seat range that even the White House acknowledged would mean a clear defeat for the president. But as returns came in from some of the western races, the estimates moved back toward the 20-seat figure.

An ABC-News exit poll of yesterday's voters gave the Democrats a 57 to 40 advantage, which, historical standards suggest, would translate to a gain of 30 or more seats in the House of Representatives. The survey indicated that there were unusually high numbers of blacks and union members voting, perhaps a reflection of special turnout efforts among those groups. And there were signs, at least in some states, of lagging Republican turnout.

One striking finding of the exit poll was the declaration by one-third of those who said they voted for Reagan in 1980 that they had voted for Democratic congressional candidates this time.

The Republican Senate losses included the defeat of freshman Sen. Harrison H. (Jack) Schmitt in New Mexico by state Attorney General Jeff Bingaman (D) and the defeat of Rep. Millicent Fenwick (R-N.J.) by millionaire businessman Frank R. Lautenberg (D) in the battle for the New Jersey Senate seat Republicans inherited earlier this year with the forced resignation of Democratic Sen. Harrison A. (Pete) Williams Jr.

The Republicans recouped one seat in Virginia, where Rep. Paul S. Trible Jr. (R) defeated Lt. Gov. Richard J. Davis (D) for the seat of retiring Sen. Harry F. Byrd Jr., an independent who voted with Reagan but caucused as a Democrat.

The dimensions of the Democratic gains in the House were clouded by the slowness of the count and the number of close races. But the Democrats were in a position to make multiple-seat gains in Indiana, Kentucky, Missouri, Pennsylvania, Tennessee and West Virginia.

Among those apparently losing their House seats were Rep. Thomas B. Evans Jr., of Delaware, an early Reagan supporter, and Rep. Ed Weber of Ohio, who defeated veteran Rep. Thomas L. Ashley two years ago.

Republican Cissy Baker, daughter of Senate Majority Leader Howard H. Baker Jr. was defeated in her bid for a Tennessee House race.

In one of the notable match-ups forced by redistricting after the 1980 census, Rep. Margaret M. Heckler of Massachusetts, one of the "Gypsy Moth" Republicans who tried to keep her distance from the president, lost to Rep. Barney Frank, a liberal Democrat.

But the day had its list of notable winners, as well.

George C. Wallace (D), half-deaf and confined to a wheel-chair, won another term -- his fourth -- as governor of Alabama, defeating Montgomery Mayor Emory Folmar (R).

Sen. John C. Stennis (D-Miss.), 81, won another Senate term by defeating lawyer Haley Barbour (R), who was born in 1947, the year Stennis entered the Senate, and who tried to make Stennis' age an issue.

Sen. Edward M. Kennedy (D-Mass.) breezed to victory over businessman Raymond Shamie (R) in a campaign that allowed him to test-market new ads defending his personal character for possible use in another presidential bid in 1984.

The best news for the Democrats was the recapture of the Texas governorship, with Attorney General Mark White (D) ousting Gov. William P. Clements Jr. (R), along with the expected takeovers of vacated Republican governorships in the Midwest. Rep. James J. Blanchard won in Michigan, ex-governor Rudy Perpich staged a comeback in Minnesota, former lieutenant governor Richard F. Celeste won in Ohio and Anthony S. Earl, a former conservation commissioner, was elected in Wisconsin. In Arkansa, ex-governor Bill Clinton (D) won his grudge fight with his 1980 conqueror, Gov. Frank D. White (R). In Nebraska, Vietnam war Medal of Honor winner Bob Kerrey (D) defeated Gov. Charles Thone (R).

Aside from California, the other Republican pickup came in New Hampshire, where two-term Gov. Hugh Gallen (D) lost to John H. Sununu (R), a college professor who was almost named secretary of energy in the Reagan Cabinet.

In the face of the highest unemployment since the Great Depression, Reagan, in campaigning for the GOP, urged Americans to "vote your hopes, not your fears." He said the economic program he pushed through Congress last year had cracked the back of inflation and high interest rates and that unemployment would follow them down.

But the voters appeared to agree more with the Democratic dissenters, who argued for immediate economic stimulus through housing subsidies and public works jobs and said the 1983, third year of Reagan's three-year tax cut should be postponed for middle-and-upper-income taxpayers in order to reduce the federal deficit.

Exit poll interviews with voters showed clearly that the issue that was driving yersterday's voting was unemployment. Two of every five voters said that was the main problem, and, in ABC News figures, they split 68 to 30 for the Democrats.

Democrats also gained by their identification with the protection of Social Security and support of a freeze on nuclear weapons. But everything else was dwarfed by the unemployment question.

Inflation, the dominant issue in the 1980 election, was mentioned as the top issue by only one-sixth of the voters and was of no advantage to the Republicans, with Democrats actually leading 51 to 45 among those voters in the exit polls.

The only major issue cutting for the Republicans -- mentioned by one-sixth of the sample -- was excessive government spending, and there the Republicans had a 2-to-1 advantage.

But when ABC News interviewers asked voters which of several factors were important in choosing the congressional candidate they supported, not limiting them to a single choice, only 28 percent said opposition to Reagan's economic policy was a factor, and only 26 percent said support of that policy entered importantly into their judgment.

That would suggest that the election was a "referendum on Reaganomics" for half the voters, and that they split about evenly. Republicans got 81 percent of the votes of those for whom support of Reaganomics was important, and Democrats, 86 percent of the votes of those to whom opposition was important.

But Democrats had a clear and unanswered advantage on two other frequently mentioned factors: incumbency and party label. Those who said the candidate's long experience was important split 60-to-39 Democratic, and those who said party label was important went Democratic by 60 to 38.

The exits polls also shed light on some other forces working in the electorate. There was evidence of a gender gap, with women favoring Democratic candidates by 59-to-39 percent, while men gave Democrats a smaller 55-to-42 percent majority.

But the election, like others, was about people as well as issues. There were plenty of vivid personalities on the ballots, and plenty of careers on the line.

Democrats reelected senators yesterday in Florida, Mississippi, West Virginia, Ohio, Massachusetts, Michigan, Maryland, North Dakota, Tennessee, Texas, Maine, New York, Wisconsin, Arizona, Montana, Nebraska, Hawaii and Washington, losing none in the races that had been decided.

Republicans reelected incumbents in Minnesota, Rhode Island, Indiana, Pennsylvania, Delaware, Connecticut, Wyoming, Utah and Vermont.

In the governors' races, Democrats reelected incumbents or successors to retiring Democrats in New York, South Carolina, Georgia, Florida, Hawaii, Massachusetts, Connecticut, Maine, Oklahoma, Maryland, Colorado, Rhode Island, Kansas, Alabama, Arizona, and Wyoming.

Republican governors won new terms in Oregon, Pennsylvania, Tennessee, Vermont and South Dakota, and Lt. Gov. Terry Branstad retained Iowa for the GOP.

More than the individual races, the stakes in the election were focused on the question of whether Reagan's unfinished economic and defense program would be supported, rewritten or rejected by the new Congress.

The president's prime objective, which sent him flying through the West on a rescue mission last week, was to retain the control of the Senate the GOP won with his coattail help in 1980.

A net gain of five seats for the Democrats would return them to control of the Senate.

In the House, the real question was how large the Democratic gains would be. By most reckonings, Democrats could count 203 safe seats going into yesterday's voting and Republicans, 129. Of the 101 contested seats, 38 were regarded as leaning to the Democrats, 44 to the Republicans, and 19 were rated as tossups.

Among the mostly closely contested districts were six where redistricting forced incumbents of opposite parties to face off.

White House strategists calculated that their conservative coalition of Republicans and southern Democrats could prevail if not more than 19 GOP seats were lost yesterday.

Democrats, noting margins of six to 10 votes for the president on some of the key roll calls of the last Congress, said a shift of even 11 or 12 seats might enable them to rewrite his program. Both sides agreed that a gain of 30 seats or more for the Democrats would, in effect, stop what some have called "the Reagan revolution" in its tracks.

In the post-World War II period, the average loss for the party that has taken over the White House in the previous election has been 11 seats.

Yesterday's midterm election was the most expensive in history, with at least $300 million going into Senate and House campaigns and perhaps that much again expended in primaries and autumn campaigns for governor and state offices.

Expectations were that the array of contests and an unusually large number of initiatives and referenda would pull out more than 35 percent of the potential vote, reversing a steady 20-year decline in turnout for both off-year and presidential elections.

About one-fifth of the ballots offered referenda on a nuclear weapons freeze, and in many states there were ballot questions on tax limits, gun control and other controversial issues.

All told, voters were deciding on 36 governorships, 33 U.S. Senate seats and 425 U.S. House seats and electing legislatures in 46 of the 50 states.

Democrats went into the election with a 27-to-23 advantage in governorships, and a 242-to-191 majority in the House, with two previously Democratic seats vacant. On Election Day, Republicans held a 54-to-46 majority in the Senate, with one of the minority seats held by retiring Virginia independent Byrd, who caucused with the Democrats.

Of the 36 governorships at stake, 20 were held by Democrats and 16 by Republicans. Of the 33 Senate seats on the ballot, 20 (including Byrd's) were Democratic and 13 Republican.

All House members were up for election, but Louisiana's eight incumbents--six Democrats and two Republicans--won new terms by winning majorities in the open primary held last September, which under state law exempted them from a runoff that would have been the equivalent of a general election. Two Georgia seats, both held by Democrats, will not be filled until Nov. 30 because of redistricting problems.

Like any off-year election, it was a mixture of national themes, issues and campaigners and the strengths and weaknesses of the local candidates. Reagan visited 14 states in 10 days of campaigning since Labor Day, carrying his "stay the course" message. Vice President Bush, fulfilling the traditional role of that office, was out even more, hitting 29 states in 45 days.

A parade of Democratic campaigners -- most of them 1984 presidential hopefuls -- was led by former vice president Walter F. Mondale, who went to 21 states in 41 days.

Last year, when the Republicans began amassing their campaign warchest and recruiting their candidates, they did so in hopes of building on the breakthrough election of 1980, which saw them defeat a Democratic president for the first time in 60 years and capture control of the Senate for the first time in 26 years.

Although no party with an incumbent president gained strength in a midterm election since the Democrats picked up nine House and 10 Senate seats in 1934, Republicans dreamed of gaining the 26 seats that would give them a majority in the House and of adding to their Senate majority. The Senate gains were needed, they said, to build in protection for 1984 and 1986, when almost two-thirds of the contests will involve Republican seats.

Prospects for gains in the House were enhanced, Republican spokesmen said, by the post-1980 census reapportionment that shifted 17 seats, primarily from northern urban areas to southern and western Sun Belt territory with a more conservative climate. At one point, Republicans expected to get half the 26 seats they need to win control of the House from reapportionment alone.

Those hopes were encouraged in the first eight months of the Reagan presidency as polls showed the GOP whittling away, and almost eliminating, the Democrats' longstanding advantage in basic party identification nationwide. In the summer of 1981, the number of Americans telling pollsters they thought of themselves as Republicans was almost as large as the number calling themselves Democrats.

The realignment dream grew brighter as the divided Congress gave quick approval to the essence of Reagan's 1980 platform, with conservative southern Democrats joining near-solid ranks of Republicans to wrest control of the House from Speaker Thomas P. (Tip) O'Neill Jr. (D-Mass.) and its nominal Democratic leadership on the president's major issues. In quick order, the House and Senate passed Reagan's three-year, across-the-board tax cut, the first round of domestic budget cuts and the sharp step-up in military spending.

But the dream began to fade in the August recess of 1981.