Cory Booker

Newark Mayor Cory Booker before voting in the special election for U.S. Senate. (Julio Cortez / Associated Press / October 16, 2013)

Newark Mayor Cory Booker, who harnessed the power of social media to gain fame far beyond his city, is heading to Washington after winning a special election to fill New Jersey's U.S. Senate seat.

With 52% of the vote in, Booker was leading Republican tea party opponent Steve Lonegan, 55% to 44%. The Associated Press called the race for the Democrat within hours after the polls closed.

After brushing past the tea party-fueled challenge from Lonegan, Booker will take over a seat long held by Democrat Frank R. Lautenberg, who died in June.

"Thank you so much, New Jersey. I'm proud to be your senator-elect," Booker wrote on Twitter.

Booker, who has 1.4 million Twitter followers and has raised money from Republicans and independents like New York Mayor Michael R. Bloomberg, has tried to use the federal government shutdown to cast himself as a moderate who is willing to compromise. He was best known before this election as a mayor with famous friends, such as Oprah Winfrey, who went from Stanford to Oxford then back to the inner city.

Lonegan, a legally blind former mayor of Bogota, N.J., has not shied from his conservative positions. He spoke publicly about his support of the government shutdown, his opposition to the Affordable Care Act and government-backed health insurance in general. He was the state director for Americans for Prosperity, the conservative group founded by the Koch brothers, and held a rally last weekend with Sarah Palin and the Tea Party Express.

Both candidates have been featured in documentaries: Booker in “Brick City,” about his first, failed, mayoral campaign, and Lonegan in “Anytown, U.S.A.,” about his 2005 mayoral race.

Republicans have not won a U.S. Senate race in New Jersey since 1972, and Democrats have an advantage in voter registration: one-third of voters are registered Democrats while 20% are Republicans.

But pollsters said in preelection surveys that the election’s odd timing — on a Wednesday less than a month before statewide contests take place  — made predictions of voter turnout difficult.

Republicans may have fared better with a more moderate candidate, but Republican Gov. Chris Christie blocked anyone else from running, wanting GOP support focused on his reelection, said Patrick Murray, director of the Monmouth University poll, which on Monday showed Booker with a 10-percentage-point lead.

"These things tend to have Christie’s fingerprints all over them,” Murray said. “A lot of Democrats may decide to vote for Cory Booker and sit out on the losing gubernatorial campaign.”

Booker will have to run again next year to defend his seat. While party leaders will likely push the charismatic Booker to become a face of the Democratic Party, he’ll need to work hard to keep voters happy at home too, said Ben Dworkin, the director of the Rebovich institute for New Jersey Politics at Rider University.

“He’s going to have to keep his head down, do a lot of constituent service and build up more trust,” Dworkin said. “I don’t think we’ll necessarily see him gallivanting around the country.”

alana.semuels@latimes.com

Twitter: @alanasemuels