Her victory, which was almost unthinkable a few weeks ago, provided tea party and grass-roots activists one of their biggest victories of the year. But the defeat of Castle, a former governor and one of the most popular politicians in the state, jeopardized the GOP's once-high hopes of winning the Democratic-held seat in November's midterm election.

O'Donnell is viewed as a far weaker candidate, and Democrats say she is too conservative for the state. But her victory was a reminder of the unpredictable forces at work in politics this year and the power and energy of the antiestablishment sentiment among voters nationwide that could be aimed at Democrats.

Castle has been a fixture in Delaware politics for two decades. He served two terms as governor and nine in the House and was once considered not just a shoo-in for the nomination but also the favorite in November to take away the seat Vice President Biden once occupied.

But an endorsement from former Alaska governor Sarah Palin and support from the Tea Party Express gave O'Donnell a late burst of energy. Despite a strong counterattack from Castle and national and state Republican leaders, O'Donnell won easily, with 53 percent of the vote to Castle's 47.

O'Donnell, who declared "no more politics as usual" in her victory speech, said, "This is more of a cause than a campaign."

Shortly after her victory was projected, Castle told supporters that "the voters in the Republican primary have spoken, and I respect that decision."

The outcome was the latest in a string of embarrassments for the Republican establishment this year, underscoring the civil war that continues to rage in the party. Last month, Sen. Lisa Murkowski of Alaska lost her primary to political newcomer Joe Miller, who like O'Donnell had the support of Palin and tea party activists. Last spring, tea party forces defeated Sen. Robert F. Bennett of Utah at the Republican state convention.

Those were the most prominent Republicans to fall to the grass-roots movement that is roiling the party, but hardly the only ones. Establishment-backed candidates in Kentucky, Nevada, Colorado and Connecticut also lost in their primaries, and in Florida, Gov. Charlie Crist bolted the party rather than risk losing the Senate nomination to conservative Marco Rubio.

But in some ways, what happened to Castle was the most shocking of all the races this year. O'Donnell is a perennial candidate - she lost the Senate race to Biden two years ago - who was attacked by the party establishment.

Murkowski was caught by surprise in Alaska, spurning advice from national GOP leaders to take Miller's challenge seriously. That was not the case in Delaware. Murkowski's loss provided a wake-up call to Castle and the Washington GOP establishment. But even a concerted assault on O'Donnell by Castle, Delaware Republican Party Chairman Tom Ross and the National Republican Senatorial Committee could not overcome the momentum and energy of the grass roots.

Castle was the clear favorite to win in November and take the seat Biden held for three decades before he resigned to become President Obama's vice president. Polls showed Castle leading Democrat Chris Coons, the New Castle County executive, and many Democrats considered the seat virtually gone.