With his campaign reeling from a sex scandal, Illinois Republican senatorial nominee Jack Ryan withdrew from the race yesterday, setting off a frantic scramble to find another candidate to run against heavy odds favoring a Democrat to win the seat.

Ryan, an investment banker who made millions before quitting to teach at an inner-city school in Chicago, struggled for four days to salvage his campaign in the wake of explosive allegations by his ex-wife, actress Jeri Ryan. In divorce papers released Monday, she said Ryan had pressured her to perform sex acts in front of other people during the late 1990s at "bizarre clubs" in New York, New Orleans and Paris.

He denied the charges and insisted as late as Thursday that he was staying in the race. But the allegations triggered a furor among Republicans, many of whom complained that he misled them about the documents and said they feared the scandal would hurt other GOP candidates in November.

"It's clear to me that a vigorous debate on the issues most likely could not take place if I remain in the race," Ryan, 44, said in a statement issued by his campaign. "What would take place, rather, is a brutal, scorched-earth campaign -- the kind of campaign that has turned off so many voters, the kind of politics I refuse to play. Accordingly, I am today withdrawing from the race."

Illinois Republican leaders expressed relief. "Jack Ryan made the right decision," said House Speaker J. Dennis Hastert (R-Ill.). "I know it must have been a difficult one."

Hastert and other members of the Illinois delegation in the U.S. House met Thursday to discuss the race and agreed that Ryan should withdraw, according to a GOP aide.

Ryan won a multi-party primary in March and was once seen as a dream candidate. He was running for an open seat now held by Sen. Peter G. Fitzgerald (R-Ill.), who chose not to seek a second term in light of what appeared to be bleak prospects for reelection.

Illinois has been trending Democratic, and Democrats came up with a dream candidate of their own: state Sen. Barack Obama, the biracial son of a Kenyan father and an American mother, who became a community organizer, civil rights lawyer, skilled legislator and charismatic campaigner. Even before this week, Obama was running well ahead in the polls.

Fitzgerald had urged Ryan to stay in the race. In an interview yesterday, Fitzgerald said that Republicans who pushed Ryan out of the race had no "Plan B" for a post-Ryan campaign, and that the party faces even more daunting odds in competing with Obama.

"Obama is a formidable candidate, it's a tough state for Republicans, and anyone coming in now will have to start from scratch," he said.

Illinois has always been critical to Democrats' hopes of winning back control of the Senate, where Republicans have a majority of 51 out of 100. Ryan's troubles made Democrats even more confident about Illinois and contributed to their rising optimism about prospects for taking back the Senate, if they can minimize losses in the South and pick up several other seats from non-southern states.

Ryan's successor will be chosen by the Illinois GOP's state central committee, presumably in the next week or two. There was no instant big-name front-runner, and Dan Allen, spokesman for the National Republican Senatorial Committee, said a long list of potential candidates might emerge.

Among those mentioned are state Sen. Steven J. Rauschenberger, dairy company owner Jim Oberweis and Andrew McKenna, all of whom lost to Ryan in the March primary. Ron Gidwitz, a former chairman of the Illinois Board of Education, is cited by some as a leading contender.

Some Republicans were also hoping to interest Patrick Fitzgerald (no relation to the outgoing senator), an Illinois-based U.S. attorney. He is leading a probe in Washington into the leak of Valerie Plame's identity as a CIA officer.

Other better-known Illinois Republicans, such as former governor Jim Edgar, have indicated no interest in the race.

Jack Ryan left the race after a controversy over recently released divorce papers.