Senator Barack Obama claimed the Democratic presidential nomination on Tuesday evening, prevailing through an epic battle with Senator Hillary Rodham Clinton in a primary campaign that inspired millions of voters from every corner of America to demand change in Washington.

A last-minute rush of Democratic superdelegates, as well as the results from the final primaries, in Montana and South Dakota, pushed Mr. Obama over the threshold of winning the 2,118 delegates needed to be nominated at the party’s convention in August. The victory for Mr. Obama, the son of a black Kenyan father and a white Kansan mother, broke racial barriers and represented a remarkable rise for a man who just four years ago served in the Illinois Senate.

“Tonight, we mark the end of one historic journey with the beginning of another  a journey that will bring a new and better day to America,” Mr. Obama told supporters at a rally in St. Paul. “Because of you, tonight I can stand here and say that I will be the Democratic nominee for president of the United States of America.”

In a speech to supporters in New York City, Mrs. Clinton paid tribute to Mr. Obama, but she did not leave the race. In a speech more defiant than conciliatory, she again presented her case that she was the stronger candidate and argued that she had won the popular vote, a notion disputed by the Obama campaign.