Up against real enthusiasm for Mr. Romney — or, just as important, against Mr. Obama — among Republicans and many independents, their strategy of spending vast sums of money on their get-out-the-vote operation seemed vindicated on Tuesday.
As opinion surveys that followed the first debate between Mr. Romney and Mr. Obama showed a tightening race, Mr. Obama’s team had insisted that its coalition was coming together as it hoped it would. In the end, it was not a bluff.
Even with Mr. Obama pulling off a new sweep of the highly contested battlegrounds from Nevada to New Hampshire, the result in each of the states was very narrow. The Romney campaign was taking its time early Wednesday to review the outcome and searching for any irregularities.
The top issue on the minds of voters was the economy, according to interviews, with three-quarters saying that economic conditions were not good or poor. But only 3 in 10 said things were getting worse, and 4 in 10 said the economy was improving.
Mr. Romney, who campaigned aggressively on his ability to turn around the deepest economic downturn since the Great Depression, was given a narrow edge when voters were asked which candidate was better equipped to handle the economy, the interviews found.
The electorate was split along partisan lines over a question that drove much of the campaign debate: whether it was Mr. Obama or his predecessor, George W. Bush, who bore the most responsibility for the nation’s continued economic challenges. About 4 in 10 independent voters said that Mr. Bush should be held responsible.
The president built a muscular campaign organization and used a strong financial advantage to hold off an array of forces that opposed his candidacy. The margin of his victory was smaller than in 2008 — he held an advantage of about 700,000 in the popular vote early Wednesday — but a strategic firewall in several battleground states protected his Electoral College majority.
As Mr. Romney gained steam and stature in the final weeks of the campaign, the Obama campaign put its hopes in perhaps one thing above all others: that the rebound in the auto industry after the president’s bailout package of 2009 would give him the winning edge in Ohio, a linchpin of his road to re-election.
Early interviews with voters showed that just over half of Ohio voters approved of the bailout, a result that was balanced by a less encouraging sign for the president: Some 4 in 10 said they or someone in their household had lost a job over the last four years.
He defeated Mr. Romney 52 percent to 47 percent in Hamilton County, home to Cincinnati, but only because of the number of votes he banked in the month leading up to Election Day.
Mr. Obama won despite losing some of his 2008 margins among his key constituencies, including among younger voters, blacks and Jewish voters, yet he appeared to increase his share among Hispanics and Asians. Early exit poll results showed Latinos representing about 1 in 10 voters nationwide, and voting for Mr. Obama in greater numbers than four years ago, making a difference in several states, including Colorado and Florida.
He held on to female voters, according to preliminary exit polls conducted by Edison Research, but he struggled even more among white men than he did four years ago.
Mr. Romney’s coalition included disproportionate support from whites, men, older people, high-income voters, evangelicals, those from suburban and rural counties, and those who call themselves adherents of the Tea Party — a group that had resisted him through the primaries but had fully embraced him by Election Day.
The Republican Party seemed destined for a new round of self-reflection over how it approaches Hispanics going forward, a fast-growing portion of the voting population that senior party strategists had sought to woo before a strain of intense activism against illegal immigration took hold within the Republican grass roots.
It was the first presidential election since the 2010 Supreme Court decision loosening restrictions on political spending, and the first in which both major-party candidates opted out of the campaign matching system that imposes spending limits in return for federal financing. And the overall cost of the campaign rose accordingly, with all candidates for federal office, their parties and their supportive “super PACs” spending more than $6 billion combined.
The results Tuesday were certain to be parsed for days to determine just what effect the spending had, and who would be more irate at the answer — the donors who spent millions of dollars of their own money for a certain outcome, or those who found a barrage of negative advertising to be major factors in their defeats.
While the campaign often seemed small and petty, with Mr. Romney and Mr. Obama intensely quarreling and bickering, the contest was actually rooted in big and consequential decisions, with the role of the federal government squarely at the center of the debate.
Though Mr. Obama’s health care law galvanized his most ardent opposition, and continually drew low ratings in polls as a whole, interviews with voters found that nearly half wanted to see it kept intact or expanded, a quarter wanted to see it repealed entirely and another quarter said they wanted portions of it repealed.
In Chicago, as crowds waited for Mr. Obama to deliver his speech, his supporters erupted into a roar of relief and elation. Car horns honked from the street as people chanted the president’s name.
“I feel like it’s a repudiation of everything the Republicans said in the campaign,” said Jasmyne Walker, 31, who jumped up and down on the edge of a stone planter in a downtown plaza. “Everybody said that if he lost it would be buyer’s remorse — that we were high on hope in 2008. This says we’re on the right track. I feel like this confirms that.”
Michael Cooper and Allison Kopicki contributed reporting.