“We won the areas that conservatives and Republicans populate,” Mr. Santorum told an overflow crowd in Gettysburg. “We’ve got five weeks until a big win and a big delegate sweep in Pennsylvania. We must go out and fight this fight.”

Newt Gingrich finished well behind Mr. Santorum and gave no election night speech. But in an interview on Fox News Channel, he questioned Mr. Santorum’s ability to mount the strongest challenge to Mr. Romney and called himself the best choice for conservatives. He predicted a possible convention standoff in which “we’ll have a real conversation about who can best beat Barack Obama.” Representative Ron Paul of Texas, who was also running poorly in the Illinois returns, made no appearance.

If there was one driving force for Mr. Romney, it was the desire of Illinois Republicans to defeat Mr. Obama. Mr. Romney was supported by nearly three-quarters of those who said in exit polls that winning in November was their top priority.

Mr. Romney came here hoping to provide a convincing enough victory to be able to accelerate his move toward directly confronting the president, leaving the intricacies of the delegate fight to his campaign advisers. Yet unless his Republican rivals decide to step aside, Mr. Romney will not be able to move beyond the primary campaign for at least two more months.

More important than the popular vote here was the allocation of delegates, who for the first time this year appeared on ballots along with the presidential candidates they are pledged to support in the general election. Mr. Romney was vying to win most of them, helping his campaign to widen its lead in the competition to reach the 1,144 necessary for the nomination.

He won at least 41 of the 54 delegates at stake Tuesday, according to The Associated Press, with Mr. Santorum winning at least 10. Three delegate races remained too close to determine early Wednesday.

Party leaders expected Mr. Romney’s victory to “take the steam out of Santorum’s argument” for fighting on to the convention, as the Illinois Republican Party chairman, Pat Brady, a Romney supporter, put it Tuesday.