NEWARK, N.J. - Cory Booker, the Democratic Newark mayor whose sterling biography and star power have made him a political celebrity, will formally enter the national fray after winning New Jersey's special Senate election Wednesday.

Booker, 44, will become the Senate's seventh youngest member, and its ninth-ever African American and only the fourth black senator ever popularly elected. Even before winning the race, he was widely seen as a potential vice presidential contender as soon as 2016, though his credentials took a hit when the race turned out far closer than many expected.

With nearly all of the vote counted, Booker led Republican Steve Lonegan by about 10 percentage points - a convincing margin in most races, but much smaller than many had predicted for a rising star facing an underfunded opponent with views out of step with New Jersey's liberal leanings.

The victory came just six days after Booker's 76-year-old father, Cary, died following a recent stroke.

"God, I wish he was here physically, but I know he is here in spirit," Booker said at his victory celebration at the New Jersey Performing Arts Center.

Running as a post-partisan uniter who has vowed to solve the dysfunction on display in the Capitol, Booker beat an opponent who proudly promoted his staunchly conservative views despite New Jersey's Democratic leanings, and who urged Republicans to keep up the fight in the government shutdown.

Booker dismissed the "zero-sum" mentality and "shallow politics" of Washington.

"When we come together, when we stand together, when we work together, there is nothing we can't do or achieve," he said in a 25-minute victory speech inside a small auditorium. "The lines that divide us are nothing compared to the ties that bind us."

Lonegan was a longshot from the start but closed on Booker with a tenacious campaign.

"I said to myself, who wants that job anyway?" he said last night to laughs at the Bridgewater Manor in Somerset County.

Booker, who holds liberal views on most issues and was endorsed by President Obama, will again give Democrats control of 55 Senate seats, counting left-leaning independents.

He will take the seat formerly held by Sen. Frank R. Lautenberg, a Democrat who died in June and has been temporarily replaced by a Republican, Jeffrey S. Chiesa, who was appointed by Gov. Christie.

Christie's office has said it will certify the election results by Nov. 5, which would open the door to Booker's swearing-in.

In Washington, Chiesa told Politico that he expected his last day to be around Nov. 1.

Booker, in his victory speech, ticked off a long list of liberal priorities, including better funding for schools, raising the minimum wage and promoting equal pay for women, college affordability, and accessible health care.

"I'm going down to make the Senate more accessible to all of us," he said. "I will bring more voice to the voices too often ignored in our state."

Booker's pop-culture persona, embrace of technology, and talent for self-promotion have long helped him thrive in the digital age - and prompted dizzying speculation about his potential.

His victory formally catapults him onto the national stage, though Rutgers political scientist Ross Baker said Booker first has to make his presence felt across New Jersey.

"He's got a much bigger constituency; he's got a much more diverse constituency than he did in the city of Newark," Baker said.

His first formal foray into statewide politics proved more rocky than many expected. The Senate campaign left Booker bruised, if not politically scarred, after Lonegan attacked his record, casting the Democrat as more celebrity than substance, and drawing attention to the crime and unemployment rates still plaguing Newark and raising questions about some of the heroic stories that have helped build Booker's reputation.

For Booker, accustomed to glowing media coverage, the scrutiny cast an unflattering glare on his weaknesses, including a campaign interrupted by fund-raisers with movie stars and his dependence on platitudes.

Booker enjoys strong popularity, but polls showed that many New Jerseyans also came to see him as primarily concerned with self-promotion.

Supporters, though, said many of those questions will quickly be forgotten when Booker joins the Senate, where he will have an even broader platform for his brand of idealism and inspiration.

Booker will have to run for reelection in 2014. The vote Wednesday was only to finish the last year of Lautenberg's unexpired term.

 While Booker has campaigned as a positive force, he turned aggressive as the race tightened, attacking Lonegan as an "extremist" out of step with New Jersey. He called the election a referendum on the "shutdown politics" of the tea party.

Lonegan promoted his hard-right rhetoric in an attempt to rally the Republican base. He supported the government shutdown and praised Sen. Ted Cruz (R., Texas), a tea party hero, for having the "guts to hold the line" on the opposition to the 2010 health law known as Obamacare. Cruz recorded robocalls on Lonegan's behalf in the campaign's final days.

Several Republican voters interviewed Wednesday said the shutdown led them to support Booker rather than the confrontational Lonegan, and polls showed that New Jersey voters blamed the GOP as the stalemate in Washington dragged on.

"We came well closer to winning this election than anyone would ever have expected," Lonegan told supporters. "The big Washington power groups and consultants said we couldn't win. Well, maybe if they hadn't played a role in this election, we would have won."

He said he would return to the private sector, signaling an end to a political career that included 12 years as mayor of Bogota and seven with the state chapter of the conservative group Americans for Prosperity.

"I've done my part," he said. "It's time for others now to step up."

Republicans will have to quickly decide whether to give another conservative a chance, or run a moderate as they try to challenge Booker next year.