Addressing supporters in Columbus, Ohio, an exultant Clinton declared, "We're just getting started."
Obama, appearing disappointed, insisted the contest was still his to lose, citing his continuing edge in the delegate count. "We know this: No matter what happens tonight, we have nearly the same lead as we did this morning, and we are on our way to winning the nomination," the Illinois senator told cheering fans at a late-night rally in San Antonio.
The Democrats split two other contests, Clinton winning handily in Rhode Island and Obama easily taking Vermont.
On the Republican side, John McCain swept the day's four GOP primaries to clinch the Republican nomination and force Mike Huckabee from the race. He and the two Democrats called McCain to offer congratulations.
The Arizona senator, who staunchly supports the U.S. presence in Iraq, signaled his intention to make the war a major issue in the fall. "Our most vital security interests are involved there," McCain told supporters in Dallas.
The Democratic race, by contrast, appears deeply unsettled after a long night of counting ballots in Ohio and Texas. The next major contest is April 22 in Pennsylvania, making for an unusually long stretch between races in this heavily compacted election season.
Wyoming will hold caucuses on Saturday, and Mississippi has a primary Tuesday. But neither is likely to reshape the essential dynamic of what has become the most competitive presidential nominating fight in at least 40 years. That promises at least another seven weeks of intensive campaigning.
At a raucous victory party in Ohio's capital city, Clinton told a ballroom full of backers: "As Ohio goes, so goes the nation. Well, this nation's coming back and so is this campaign. People of Ohio have said it loudly and clearly: We're going on, we're going strong and we're going all the way."
Tuesday was the biggest day of balloting left on the Democrat's election calendar -- with 370 pledged delegates at stake in four contests -- and voters responded as they have throughout the campaign, turning out in record numbers
In Ohio, they braved raw, late-winter weather, including freezing rain in the north and flood warnings across most of the state. Citing the conditions, and a shortage of paper ballots in some precincts, state officials went to court to extend the polling hours in several places.
Obama, bidding to become the nation's first black president, entered the day with 11 straight victories and hoped to force Clinton from the race by taking Ohio and Texas. Clinton's top advisors -- including her husband, the former president -- had said she needed victories in both states to remain viable.
But on Tuesday the New York senator seemed to back away from that assessment, intimating earlier in the day that a victory in Ohio alone could persuade her to continue, even if Obama maintained his lead in delegates. She is vying to become the first female president in the nation's history.
"My husband didn't get the nomination wrapped up until June. That has been the tradition," Clinton told reporters, though she failed to note that the primaries when he first ran in 1992 were much more spread out. As of today, well over half the states have voted, awarding more than 80% of delegates to the party's national nominating convention.
Even before the first polls closed, Obama was bracing for the race to continue, citing plans to campaign ahead of the contests in Wyoming and Mississippi. "Either way, we'll go on," he told reporters in San Antonio.
On the Republican side, McCain began the day all but certain to clinch the GOP nomination and eliminate Huckabee. Aides printed up a banner with the number of delegates needed -- 1,191 -- and hung it in a ballroom at Dallas' Fairmont Hotel. (It was kept covered until McCain officially went over the top.)
Huckabee dropped out of the race less than an hour after the last polls closed in El Paso. Addressing his supporters in Irving, Texas, the former Arkansas governor said that he had called McCain moments earlier to congratulate him and offer "to do everything possible to unite our party" and "unite our country so that we can be the best nation we can be."
A short time later, McCain addressed supporters in Dallas with his wife, Cindy, beaming by his side. McCain claimed the nomination, just a few months after many had declared him politically dead, "with confidence, humility and a great sense of responsibility."
Signaling the broad outlines of his fall campaign, McCain scolded the two Democrats for opposing the war in Iraq, accused them of offering "big-government" solutions and, in a veiled shot at Obama's speechifying, suggested that Americans "aren't interested in an election that offers platitudes instead of principles."
"Our campaign must be and will be more than another tired debate of false promises, empty sound bites or useless arguments from the past that address not a single American's concern for their family's security," McCain said as supporters, some in cowboy boots and ten-gallon hats, erupted in cheers.
Earlier Tuesday, stumping in San Antonio, McCain expressed his eagerness to start the fall campaign. Asked to predict his likely opponent, McCain told reporters at the Armadillo Palace, a local theater, that he would wait for Democrats to settle their fight. "We will have stark differences," he said, regardless of whom he faces in the fall.
Clinton and Obama did their best over the last two weeks to play up their own differences, which are comparatively small.
They mainly ignored Vermont and Rhode Island, save for token stops. Instead, they bounced between Texas and Ohio, between sunshine and snow, and states with vastly different cultures and economic outlooks.
Ohio has lost much of its manufacturing base to foreign countries, and many there blame international trade and the impact of globalization. The North American Free Trade Agreement became a central issue, with both Democrats vowing to renegotiate the deal with Canada and Mexico.
But Clinton seemed to gain the upper hand in the final hours of the campaign, seizing on disputed reports that an Obama economic advisor had assured the Canadian government that Obama's talk was simply campaign rhetoric -- a "wink-wink," Clinton called it. Obama and the Canadian government denied the assertion.
Still, the focus on pocketbook issues seemed to help Clinton, as it did in New Hampshire, where she faced a similar do-or-die test. Exit polls found that Ohio voters who were anxious about family finances or the overall economy said they favored Clinton over Obama.
More significantly, Clinton carried many of the groups that formed the early backbone of her campaign. She won the votes of 2 in 3 white women and almost 6 in 10 white men, according to interviews conducted for TV networks and the Associated Press. Clinton also enjoyed an edge among voters making less than $50,000 a year, who made up about half the electorate.
She lost narrowly among independents and young white voters, eating into two groups that formed an important part of Obama's coalition. That reversed the pattern in recent contests, in which Obama eroded Clinton's base of support.
The Illinois senator performed best, as he has throughout the campaign, among African Americans -- winning 9 in 10 of their votes -- voters under age 30, college graduates and those making more than $100,000 a year. But they were outnumbered 2 to 1 by those over age 65. And those older voters were behind Clinton by an equally solid margin.
In Texas, the candidates faced a political landscape as different from Ohio as the physical terrain.
The state shares a long border and a history with Mexico, so trade here is regarded much more favorably. The candidates soft-pedaled their NAFTA positions and instead focused on more regional concerns, such as immigration. Both called for tougher border enforcement, but also a pathway to citizenship for the millions of immigrants already in the United States illegally.
Clinton introduced national security -- and, implicitly, the question of experience and personal toughness -- into the campaign with an ominous TV spot that asked voters to ponder who could best handle a crisis.
Obama responded that Clinton had already faced such a "red phone" moment -- the decision to go to war with Iraq -- and had failed.
But in Texas, as well as Ohio, Clinton won among late-deciders, suggesting that her attacks had made a difference.
The voting in Texas was complicated by the state's unusual combination of a primary followed by caucuses -- the "Texas two-step," as it came to be called.
Most of its 193 delegates are divided proportionally, based on the voting within 31 state Senate districts. But 67 delegates are allocated through caucuses that began after the polls closed, making it possible for a candidate to lose the popular vote but walk away with a good share of delegates.
According to the Associated Press late Tuesday, Obama had a total of 1,477 delegates, including separately chosen party and elected officials known as superdelegates. Clinton had 1,391 delegates. It takes 2,025 to win the nomination.
In the four Tuesday contests, Clinton picked up at least 115 delegates to at least 88 for Obama, the AP said. Nearly 170 more remained to be allocated for the night, mostly from Texas' primary and its follow-up caucus.
With results from one-quarter of Texas' caucuses reported, Obama was leading Clinton 55% to 45%.
Times staff writers Maria L. La Ganga, Scott Martelle, Maeve Reston, Louise Roug and Stuart Silverstein contributed to this report.