Barack Obama has seized command of the race for the White House.
The Illinois senator has beaten John McCain in Ohio and is building a near insurmountable Electoral College advantage as he bids to become the first black president.
Fellow Democrats are gaining strength in both houses of Congress.
Obama's Ohio victory denied McCain particularly precious territory. No Republican has ever won the presidency without the state.
THIS IS A BREAKING NEWS UPDATE. Check back soon for further information. AP's earlier story is below.
WASHINGTON (AP) — Barack Obama built a formidable lead in his bid to become the first black president Tuesday night, pushing ahead of John McCain in a nation clamoring for change. Fellow Democrats took four Senate seats from Republicans, and reached for more.
Obama gained precious ground in Pennsylvania, winning the state's 21 electoral votes and depriving McCain of the Democratic-leaning state where he had tried hardest to break through. Obama also swept through territory typically friendly to Democrats in the East and Midwest.
McCain countered in the safest of Republican states.
That left the battlegrounds to settle the race: Florida, Ohio, Virginia, Colorado and more. Most were customarily Republican, but Obama spent millions hoping to peel away enough to make him the 44th president, and his triumph in Pennsylvania left the Republican with scant room for error.
"May God bless whoever wins tonight," President Bush told dinner guests at the White House, according to spokeswoman Dana Perino.
A jubilant crowd of thousands gathered in Grant Park in downtown Chicago on an unseasonably mild night, confident it would be Obama. They reacted each time Obama was announced the winner in another state — and the cheers were particularly loud when Pennsylvania fell.
Interviews with voters suggested that almost six in 10 women were backing Obama nationwide, and men leaned his way by a narrow margin. Just over half of whites supported McCain, giving him a slim advantage in a group that Bush carried overwhelmingly in 2004.
The results of The Associated Press survey were based on a preliminary partial sample of nearly 10,000 voters in Election Day polls and in telephone interviews over the past week for early voters.
The same survey showed the economy was by far the top Election Day issue. Six in 10 voters said so, and none of the other top issues — energy, Iraq, terrorism and health care — was picked by more than one in 10.
The AP made its calls of individual states based on surveys of voters as they left the polls.
Obama led in electoral votes with 175 of the 270 needed to win the White House. McCain had 61.
The Democrat's states included Wisconsin, Michigan, New York, Rhode Island, Minnesota, Pennsylvania, New Hampshire, Vermont, Connecticut, Delaware, Illinois, Maine, Massachusetts, Maryland and New Jersey, as well as the District of Columbia.
McCain had Arkansas, Kansas, Kentucky, Tennessee, Oklahoma, Wyoming, Alabama, South Carolina and North Dakota.
The nationwide popular vote was remarkably close. Totals from 13 percent of the nation's precincts showed Obama with 49.9 percent and McCain with 49.2.
Democrats celebrated Senate successes in Virginia, where former Gov. Mark Warner won an open seat, in New Mexico, where Rep. Tom Udall did likewise. In New Hampshire, former Gov., Jeanne Shaheen defeated Republican Sen. John Sununu in a rematch of their 2002 race, and North Carolina Sen. Elizabeth Dole fell to Democrat Kay Hagan.
That wasn't the end of the Democratic targets, though. Republicans all but conceded in advance they would lose a seat in Colorado, and perhaps elsewhere.
Democrats also looked for gains in the House. They found their first in Florida, defeating Rep. Tom Feeney.
The resurgent Democrats also elected a governor in one of the nation's traditional bellwether states when Missouri Attorney General Jay Nixon won his race.
The White House was the main prize of the night on which 35 Senate seats and all 435 House seats were at stake. In both houses, Democrats hoped to pad their existing majorities, and Republicans braced for losses.
A dozen states elected governors, and ballots across the country were dotted with issues ranging from taxes to gay rights.
An estimated 187 million voters were registered, and in an indication of interest in the battle for the White House, 40 million or so had already voted as Election Day dawned. Turnout was heavy. In Virginia, for example, officials estimated nearly 75 percent of eligible voters would cast ballots.
Obama awaited the results at home in Chicago after a marathon campaign across 21 months and 49 states. At 47, with only four years in the Senate, he sought election as one of the youngest presidents, and one of the least experienced in national political affairs.
That wasn't what set the Illinois senator apart, though — neither from his rivals nor from the 43 men who had served as president since the nation's founding more than two centuries ago. A black man, he confronted a previously unbreakable barrier as he campaigned on twin themes of change and hope in uncertain times.
McCain, a prisoner of war during Vietnam, a generation older than his rival at 72, waited in Arizona to learn the outcome of the election. It was his second try for the White House, following his defeat in the battle for the GOP nomination in 2000.
A conservative, he stressed his maverick's streak. And a Republican, he did what he could to separate himself from an unpopular president.
For the most part, the two presidential candidates and their running mates, Republican Gov. Sarah Palin of Alaska and Democratic Sen. Joe Biden of Delaware, spent weeks campaigning in states that went for Bush four years ago. Virginia, Florida, North Carolina, Ohio, Iowa, Colorado, New Mexico and Nevada drew most of their time. Pennsylvania also drew attention as McCain sought to invade traditionally Democratic turf.
McCain and Obama each won contested nominations — the Democrat outdistancing former first lady Hillary Rodham Clinton — and promptly set out to claim the mantle of change.
"I am not George W. Bush," McCain said in one debate.
Obama retorted that he might as well be, telling audiences in state after state that the Republican had voted with the president 90 percent of the time across eight years of the Bush administration.
The race was easily the costliest in history, in excess of $1 billion, more after the congressional campaigns were counted.
McCain accepted federal matching funds, and was limited to $84 million for the fall campaign.
After first saying he would go along, Obama reversed course, then raised and spent multiples of what his rival was allowed.
McCain sought to make an issue of that, saying Obama had broken his word to the public. For weeks on end, he could not match his rival's television advertising onslaught.
Figures through mid-October showed Obama had spent roughly $240 million on television and radio advertisements.
McCain had shelled out about $115 million, and the Republican National Committee an additional $80 million on his behalf.
The ballot issues ran from a measure to ban abortion in South Dakota to proposals outlawing affirmative action in Colorado and Nebraska. Three states voted on gay marriage.