Democrat Elizabeth Warren, a Harvard law professor and bankruptcy expert who has spent her career documenting the decline of middle-class America, won the hotly contested Senate race in Massachusetts on Tuesday night, defeating Republican incumbent Scott Brown and reclaiming the seat held for decades by liberal icon Edward M. Kennedy.

Warren, who rose to national prominence as chair of the congressional panel overseeing the 2008 Wall Street bailout, is the first woman to be elected U.S. senator from Massachusetts.

“This victory belongs to you,” she told a raucous and jam-packed crowd at her headquarters in Boston. “You did this for every family that has been squeezed and hammered. We are going to fight for a level playing field and we are going to put people back to work. To all the small-business owners who are tired of a system rigged against them, we’re going to hold the big guys accountable.”

“I will always carry your stories in my heart,” Warren said. “I will be your champion.”

Just moments earlier, Brown, a pickup truck-driving Republican who stunned the political establishment by winning a special election after Kennedy’s death, conceded the race to Warren.

Explore the 2012 Senate map and view unemployment and demographics

“You know what the most difficult part is?” Brown, who won over voters in this bluest of blue states with his considerable regular-guy charm, asked supporters Tuesday night. “I now have to be breaking the news to my truck that I’ll be taking it home.”

Progressives cast the victory as a “historic moment” for working families, saying Warren would “shake up the corridors of power from Washington to Wall Street.” Sen. John F. Kerry (D-Mass.) said it was not only “a big night for Massachusetts but an enormous night for our country.”

In the end, it was a contest that cost more than $70 million, one of the most expensive Senate race in the country and among the most closely watched, with Democrats needing a Warren victory to help them retain their majority in the chamber. Money poured into Warren’s campaign coffers from around the country — more than $38 million in all — funding a steady stream of ads but, more importantly, a formidable ground operation that eventually drew strong union support and deployed tens of thousands of volunteers to doors and phones across the state.

Democrats, who have a 3-to-1 advantage over Republicans here, were determined not to repeat 2010.

A key to Warren’s victory may have been an assist from Gov. Deval Patrick (D), who helped mobilize the state’s famous Democratic machine on her behalf. Critical support also came from AFL-CIO President Richard Trumka, who told members of the labor confederaiton only weeks ago that “it’s crazy not to vote for her because she’s a woman, or because she’s a college professor, or for any other superficial reason.”

Warren ran as an unapologetic progressive, pledging to stand up for working families against Wall Street greed and saying she would not shy away from raising taxes or cutting the military budget to pay for priorities such as education. Warren also made a direct appeal to women, pledging to support equal pay for equal work and to safeguard abortion rights.

Brown, a lawyer, former state senator and former Jordache jeans model, ran under the slogan “people over party,” casting himself as a moderate Republican willing to work with Democrats to end partisan gridlock in Washington. In his short time in the Senate, Brown won praise from Democrats including Rep. Barney Frank and the Rev. Jesse L. Jackson for bucking the GOP leadership, for instance in supporting a repeal of the military’s “don’t ask, don’t tell” policy and President Obama’s Wall Street reform bill.

Though the race won rare praise for its relative civility and focus on policy, it degenerated in recent weeks into a more typical slugfest.

Brown cast Warren as a fake liberal with a fat Harvard salary and called her a lawyer who had stuck up for insurance companies against regular people. He also revived the “Fauxcahontas” scandal, based on an unproven claim by Warren, the daughter of a janitor and originally from Oklahoma, that she has Native American heritage.

For her part, Warren cast Brown as a fake independent, highlighting his votes against higher taxes on millionaires and in favor of oil subsidies.

In the end, it was Warren’s arguments that won out on a bright and chilly election day of long lines that snaked across school gyms and community centers.

“I just think she is super-bright and I just totally buy into her message of wanting to work for the little people and make sure working families get a fair shake,” said Emily Kathan, 41, a graphic designer waiting in line for nearly an hour in Somerville, just outside Boston. “For me it’s very important to have a voice like hers standing up for women, and her record of standing up to Wall Street is fabulous.”

Warren seemed to do especially well among women.

“I just like her policies, and in fact I want more women in the Senate,” said Lorraine Palmer, 71, standing outside a community center in the town of Braintree, about 10 miles outside Boston. “It’s a man’s world. I don’t care what anyone says, it is. And I think we need a woman to stand up for us, to stand against the fact that all these men want to decide what to do with our bodies.”