In recent weeks, The New York Times seems to have developed a major schoolgirl crush on Bill de Blasio (above) whom it has dubbed the “gangly liberal.” Political observers are whispering about embarrassing “news” stories like a fawning profile of his family. Could the stories be warmups for a left-field endorsement from the liberal “Paper of Record”? The Thompson and Quinn camps are nervous. (POLARIS)

The race for mayor took another unpredictable twist yesterday as Public Advocate Bill de Blasio suddenly surged to first place, forging past former Democratic front-runners Christine Quinn and Anthony Weiner.

De Blasio, who is positioning himself as the liberal antidote to Mayor Bloomberg, received 30 percent of the vote in a new Quinnipiac University poll.

It was only a month ago that the same poll had him in fourth place with a mere 10 percent.

“This is the third front-runner we’ve had,” marveled one Democratic insider.

The survey also found de Blasio would top any of his rivals in a potential runoff — the post-primary race between the top two vote-getters if no candidate reaches at least 40 percent in the Sept. 10 primary.

Quinn, the City Council speaker, was in second place with 24 percent, followed by former city Comptroller Bill Thompson at 22 percent and Weiner with 10 percent. Comptroller John Liu, whose campaign never got into gear following a federal investigation into its finances, was in single digits at 6 percent.

The poll marks a stunning comeback for de Blasio, who has been trailing for months and who couldn’t win the unified bloc of union support many insiders expected based on his past close alliances with organized labor.

De Blasio appears to have picked up steam from the collapse of Weiner, who is still reeling from revelations last month that his sexting habit continued long after his resignation from Congress in 2011.

The previous Q poll released July 29 showed Quinn leading with 27 percent, de Blasio at 21, Thompson at 20 and Weiner at 16.

Veteran political consultant George Arzt, who isn’t involved in any mayoral campaign, attributed de Blasio’s jump directly to Weiner’s slide.

“Obviously, people like an underdog and they feel [de Blasio’s] a person that is worth a second look, especially with Weiner continuing to plummet,” Arzt said.

“With Weiner in the race he wasn’t doing well. But with Weiner dropping, de Blasio’s picking up tremendously,” Arzt added. “And he’s also an outer-borough candidate coming out of Brooklyn, so there’s a lot of people who feel that resonates in the outer boroughs, which was Weiner’s strength.”

De Blasio campaign spokesman Dan Levitan stressed his candidate’s differences with Bloomberg, whose popularity in the poll among Democratic voters was split 45 to 46 percent.

“He is the only Democrat who will break from the Bloomberg years by raising taxes on the wealthy to invest in universal pre-K and after-school programs, ending racial profiling, and fighting to save community hospitals,” Levitan said.

Surprisingly, de Blasio was even beating Quinn — the only female in the mayoral race — among women, 31 to 26 percent.

Quinn, who is openly gay, is expected to bring her spouse Kim Catullo on the campaign trail soon.

Quinn tried to appear unfazed by her opponent’s huge poll bounce.

“The polls in this race have see-sawed back and forth for months. The one thing that has remained constant is that Chris Quinn is the only candidate in this race who has an actual record of delivering real results for middle-class New Yorkers,” campaign spokesman Mike Morey said.