(CNN) -- Massachusetts Attorney General Martha Coakley won the Democratic nomination and Sen. Scott Brown won the Republican nod Tuesday night in a special primary election to narrow the field of candidates vying to succeed the late Sen. Edward Kennedy.
Top Republicans and Democrats congratulated the respective winners of the seat long occupied by Kennedy, a fixture in national politics who established himself as one of the most powerful lawmakers to serve in the Senate.
Coakley's Twitter account claimed victory shortly after polls closed Tuesday. "We did it! Thank you for your support!" On her Web site, Coakley released a statement to Massachusetts voters.
"You helped me convince the voters to send a different kind of leader to Washington, one who can see all the possibilities and who will get to work on those problems that have seemed impossible to change," she said.
Brown released a statement on his Web site Tuesday night, thanking voters and using the moment to focus on the economy.
"These are serious and difficult times for the United States, and I don't pretend to have all the answers. But I know what I believe, and I will do all that I can to help make our country strong and prosperous once again," he said.
Four Democrats battled for their party's nomination, while two Republicans competed for the GOP nomination. The general election to fill the remaining three years of Kennedy's six-year term will take place on January 19, 2010.
Attention in the race focused primarily on the Democratic nomination, which featured Coakley, U.S. Rep. Michael Capuano, Boston Celtics co-owner Steve Pagliuca and nonprofit executive Alan Khazei.
Republican Brown was opposed by attorney Jack E. Robinson.
Kennedy died in August of brain cancer at 77. Massachusetts Gov. Deval Patrick appointed longtime Kennedy confidante Paul Kirk in September to fill the seat until the January special election.
Democratic National Committee Chairman Tim Kaine released a statement Tuesday night congratulating Coakley on her victory.
"Massachusetts now has an historic opportunity to elect the first female senator from the Commonwealth. I can't think of a more fitting tribute to Sen. Kennedy, who dedicated his life to advancing civil rights and expanding opportunity for women and minorities."
Sen. John Kerry, who voted Tuesday evening in Boston, also released a statement congratulating Coakley.
"This is an historic Senate seat that for 47 years was filled by the most prolific legislator in Senate history. No one can fill Ted Kennedy's shoes, but we can all work to follow in his footsteps. Just as she has in her jobs as prosecutor and attorney general, Martha Coakley will blaze her own path and make her own mark in the fight to create jobs, police Wall Street, reform health care and combat climate change," the statement said.
Republican National Committee Chairman Michael Steele, in a statement released Tuesday night, praised Brown, calling him an"accomplished Republican state senator with a long record of public service and solid leadership," and took a swipe at Coakley, saying she "spent more time planning a run for Senate than serving the people of Massachusetts."
Kennedy, who was the brother of the deceased President John Kennedy and deceased New York Sen. Robert Kennedy, was the fourth-longest serving senator in history.
The Democratic candidates turned to television to promote their campaigns and boost name identification with voters. Pagliuca had spent the most money on TV advertising through Saturday, said Evan Tracey, president of Campaign Media Analysis Group, CNN's consultant on political advertising.
Pagliuca had spent at least $4.3 million; Coakley, $1.7 million; Capuano, $1.4 million; and Khazei, $462,000, on television commercials.
Pagliuca also appeared to be the top overall spender in the race, according to Federal Election Commission data. The latest FEC filings, which cover campaign balances and transactions through November 18, show that Pagliuca had spent more than $5.6 million; Coakley, $2.6 million; Capuano, $2.1 million; Khazei, $1.7; Robinson, $325,500; and Brown, $210,000.
Massachusetts officials estimated it would cost at least $12.6 million to hold the election.
CNN's Robert Yoon contributed to this report.