Ronald Reagan vaulted over the biggest barrier to the Republican presidential nomination tonight, winning the Illinois primary by a comfortable margin despite a huge crossover vote for Rep. John B. Anderson.

George Bush finished a badly beaten third, his hopes for the presidential prize all but shattered, and Rep. Philip M. Crane was fourth.

With 82 percent of the precincts reporting, Reagan had 49 percent of the vote, Anderson 36 percent, Bush 11 percent and Crane 2 percent.

Counting in the separate contests for convention delegates was proceeding slowly, but state Rep. Donald Totten, the Reagan chairman in Illinois, predicted that Reagan will nail down at least 80 of the 102 delegates by the time the Republican convention opens in Detroit on July 14. Tonight's Reagan delegate numbers are expected to be much smaller, however, because of the ballot presence of uncommitted delegate slates backed by the state Republican organization.

Going into Illinois, Reagan had 167 delegates, Bush 45 and Anderson 13, with 17 scattered among other candidates or uncommitted. Totten estimated, on the basis of fragmentary returns, that Reagan might win 40 delegates tonight and Anderson 25. Partial figures from the state committee tended to support this.

The importance of the Reagan victory in the biggest primary so far this year is indicated by this fact: Had Reagan won 80 votes from Illinois in 1976, he would have defeated President Ford for nomination by 15 votes -- even if no other primary or caucus result had changed. In reality, Ford took 86 of the 101 Illinois delegates and beat Reagan by 117 votes overall.

With Ford having declared only last Saturday that he will not jump into the 1980 primaries, Reagan now has an almost unshakable grip on the nomination he sought without success both in 1968 and 1976.

Although Anderson made a respectable showing, his loss to Reagan in the state where both were born left the liberal congressman from Rockford still looking for his first victory of the year. He finished a strong second to Bush in Massachusetts and to Reagan in Vermont on March 4 -- a surprise that catapulted him into contention here.

But after an opening loss to Bush in the Iowa caucuses, Reagan now has won primaries in New Hampshire, South Carolina, Florida, Georgia, Alabama and Illinois.

He has established a base of strength in the Northeast, the South and the Midwest, and no rival doubts the extent of the former California governor's support in the West.

Reagan, informed that he was leading, said, "Of course it's a great boost to move into the Midwest and take a state like Illinois. It gives us momentum."

But Reagan refused to say whether any of his opponents should drop out of the race. Pressed on this point in a television interview, he replied: "That's up to them to decide."

In an interview Reagan said he was not going to claim Illinois as "the final victory" that clinched his nomination. But referring to Anderson, Reagan said, "We stopped the parade a little bit."

Nonetheless, both Anderson and Bush vowed to continue the battle.

Anderson told supporters in Chicago, "We have just begun to fight," and described himself as "the logical alternative to Reagan" in what he said is now essentially a two-man race.

But Bush, who had tried to exclude Anderson as a serious alternative until his own fortunes reached their present low point, said in Madison, Wis., that he is "in this for the long pull."

Bush's campaign manager, James Baker, told reporters tonight, "We're obviously not pleased with the finish." But he added that "it's damn important for states down the road that Anderson didn't carry his own home state."

The two rivals will challenge Reagan next Tuesday in Connecticut, where Bush has strong family ties, while Reagan's delegate slates battle uncommitted organizational slates the same day in New York.

On April 1, the fighting returns to the Midwest with primaries in Kansas and Wisconsin. Anderson tonight predicted victory for himself in Wisconsin, where many liberal Democrats are expected to cross over.

At this point, a Bush victory in Connecticut and an Anderson victory in Wisconsin appear to be essential for their challenges to maintain even a token of credibility.

Washington Post interviews with a scientific cross-section of voters leaving Illinois polling places today showed that the Republican primary was essentially a struggle between the pro-Reagan GOP regulars and the pro-Anderson independents and Democrats who took advantage of the absence of party registration here to cross over into the GOP contest.

The Republican primary apparently drew about 20 percent more participants this year than in 1976, and barely half those who took Republican ballots today consider themselves Repubicans, the Post survey showed. About one-third were self-identified independents, and almost one-tenth were Democrats.

Among the Republicans, Reagan beat Anderson, 55 to 31 percent. Among the independents, it was Anderson 45 percent and Reagan 31 percent. And among the crossover Democrats, Anderson's margin over Reagan was 73 to 10 percent.

Looking at it another way, among those Republcians who had also voted in the 1976 primary, Reagan kept 92 percent of his support and took 39 percent of the vote that had gone to Ford -- a finding that suggests Reagan may have been aided by Ford's announcement that he will not be in the later primaries.

But among the newcomers to the GOP primary, who had not voted in it in 1976, Anderson led Reagan, 57 to 29 percent. Young voters were overwhelmingly for Anderson, and so where those with college educations.

Reflecting the equivocation on the part of their candidate, only 55 percent of today's Anderson voters told the Post they were almost certain to vote for the Republican nominee in November, whoever he is.

The Illinois primary was actually two separate contests -- the statewide, nonbinding preference poll or "beauty contest," and the election of 92 district delegates to the Detroit convention from the state's 24 congressional districts.

Another 10 at-large delegates will be named later to fill out the 102-member delegation.

The delegate contests were complicated by a rule change ordered last year by the Illinois GOP Committee, removing the presidential candidate identification from the delegate names on the ballot.

This "blind primary," which was challenged unsuccessfully in court by the Reagan forces, was criticized by Anderson's campaign as well.

It was passed by the state organization with the encouragement of Gov. James R. Thompson and several of the state's congressmen, in the belief it would enhance the likelihood of taking the large uncommitted delegation of party leaders to the convention.

Thompson, who is widely viewed as having vice presidential ambitions, might then be able to deliver the delegation to his preferred candidate.

Bush, whose Illinois leaders are close to the governor, accepted the decision more fully than any of his rivals and filed only 34 delegates of his own, mainly in districts where his local supporters wanted to gain convention seats for themselves.

Anderson filed 53 delegates -- a relatively small number -- because his candidacy appeared very much of a longshot when the delegate filings closed in January. Crane filed only 35 delegates, and Reagan came in with 74.

The biggest bloc of delegate candidates however, was the uncommitted group of 108 -- many of them members of organization slates in their districts. gBoth the size of the Illinois delegation -- third-largest in the convention -- and the strategic nature of the state in a November victory made this a key primary for all the Republican contestants.

In addition, it is the native state of Anderson, Crane and Reagan, and had special significance for that reason.

At one time in the Illinois polls, after his Iowa caucus victory, Bush -- the only contender without personal links to Illinois -- was out front, with Reagan a close second and others much farther back.

But Bush's stock skidded after his losses to Reagan in New Hampshire and four southern states. The emergence of Anderson as a serious threat, further eroded Bush's standing.

Anderson won the endorsement of both Chicago newspapers, the Sun-Times and the Tribune, the latter being particularly important as a certificate to regular Republicans that he was not a liberal interloper in their party.

But in the main event of the campaign, a debate last Thursday, Bush, Crane and Reagan argued heatedly that Anderson was a maverick for his policy stands on energy, taxes and national defense, and his repeated refusal to pledge outright to support the nominee of the Republican convention.

The attack appeared to have decided impact. Dick Bennett, Anderson's pollster, said tonight, "We lost eight points to Reagan on the debate. Basically, it was on the question of Anderson's Republican loyalty." In the Washington Post poll, Reagan voters overwhelmingly believed that he had won the debate, while Anderson enjoyed a smaller degree of confidence from his supporters.