WASHINGTON — It’s not the kind of history Barack Obama planned on making — but Americans now rate him as the worst president since World War II.

With two years left to go in his second term, Obama “beat out” predecessor George W. Bush, who left office during a steep economic downturn and an unpopular war, for the dubious distinction, a new Quinnipiac University poll found.

Respondents were asked to rate the best and worst presidents from the list of 12.

One-third picked Obama as the worst, while 28 percent picked Bush.

By comparison, only 13 percent cited Richard Nixon, who resigned under the cloud of the Watergate scandal.

Eight percent chose Jimmy Carter, who left office with a stalled economy and having been unable to win the release of American hostages held in Iran.

When it comes to which president Americans consider best, Ronald Reagan cleans up, with 35 percent picking the Gipper.

Eighteen percent picked Bill Clinton and 15 percent chose John F. Kennedy, whose tenure often gets mediocre ratings from professional historians but who tends to do better among a public still enchanted by the days of Camelot before JFK’s assassination in 1963.

Eight percent chose Obama as the best president, while a mere 1 percent gave that nod to Dubya.

Most of Obama’s “worst” votes come from Republicans — 63 percent of whom picked him as dead last, far more than any other contender, with Carter trailing, at 14 percent.

But Obama also was slapped with the “worst” label by more than one-third of independents — a factor that continues to tug at his overall approval ratings.

Going head-to-head with his predecessor, 39 percent said Obama was better than Bush, while 40 percent said he was worse.

“Over the span of 69 years of American history and 12 presidencies, President Barack Obama finds himself with President George W. Bush at the bottom of the popularity barrel,” said Tim Malloy, who conducted the Quinnipiac poll.

Obama’s emergence as the worst president has come at the benefit of his predecessors. Clinton, Carter and Nixon all saw the biggest improvements in this category from 2006 to this year.

Americans also are feeling buyer’s remorse with Obama: 45 percent said the country would be better off if Republican Mitt Romney had won the presidency in 2012, while 38 percent said the country would be worse off.

Romney said at an event in New Hampshire Wednesday that he wouldn’t pursue a third presidential run.

Obama’s overall approval rating is an underwater 40-53 — a troubling sign for Democrats heading into the midterm elections.

But he can take solace in the fact that presidents usually see their numbers rise after they leave office.

And the survey itself appears prone to let people vent their opposition to a current White House occupant, while various other contenders can split the remaining disgruntled vote.

Eight years ago, while his own public-approval rating was in the tank, Bush was the hands-down leader in the “worst” category, followed by Nixon and Clinton.