Image copyright Getty Images

For the first time in this long election campaign, Republican Donald Trump has pulled ahead of Democrat Hillary Clinton in the RealClearPolitics average of national polls.

Mrs Clinton's double-digit lead, which she has held over the past several months, has vanished - and with it, apparently, Democrats' dreams of a transformational 2016 victory that would leave Republicans wandering the wilderness for a generation.

What happened? A closer look at those poll numbers offers some clarity.

Republicans have rallied around Trump

Image copyright Getty Images Image caption Conservatives, including leaders of the National Rifle Association, are falling in line behind Donald Trump (centre)

Remember the #NeverTrump movement? No one in the Republican Party seems to. While certain pundits (Bill Kristol) and politicians (Mitt Romney) continue to tilt at the independent-conservative-candidate windmill, the rank and file of the party appear to be falling in line behind their presumptive nominee.

According to a Washington Post survey, 85% of Republicans plan to vote for their man. A New York Times offering finds a similar number.

As for the party establishment, most prominent officeholders seem to either be backing Mr Trump or trying their best to disappear into the scenery. Even Senator John McCain, whose war record was belittled by Mr Trump last summer, has said he'll support the party nominee.

While there still seems to be significant interest in a third-party candidate - 44% of respondents told Washington Post pollsters that they wanted another choice - every passing day makes such a development less likely.

Republicans are deciding that Mr Trump - warts and all - is their guy. The scene last week, where Mr Trump - who once backed an assault weapons ban - received a hero's welcome and an unusually early endorsement from the National Rifle Association, only drove that point home.

Hillary Clinton has a Bernie Sanders problem

Image copyright Getty Images Image caption Sanders supporters love their man but are cool on Hillary Clinton - for now

A recent Economist/YouGov poll shows that among Sanders supporters, 55% would vote for Mrs Clinton, 15% would back Mr Trump and the rest either don't know or would pick someone else. It's not particularly surprising, given that 61% of Sanders backers view Mrs Clinton unfavourably and 72% say she's "not honest and trustworthy".

Speaking of Mr Sanders, his supporters cite these recent head-to-head polls as evidence that their man should stay in the Democratic race despite delegate maths that make victory seem extremely unlikely. In the YouGov poll, which shows Mrs Clinton with a 42% to 40% lead over Mr Trump, Mr Sanders had a 48% to 39% advantage.

That seems to support the contention that Mrs Clinton's supporters are more likely to back Mr Sanders in a general election match-up than the other way around.

It also could be an indication of what the Washington Post's Philip Bump calls the "special of the house" effect. When presented with two options that they don't like - Mr Trump and Mrs Clinton - some voters are inclined to go for a third, less-known choice.

The response from the Clinton camp is that Mr Sanders has largely avoided being targeted by his opponents on the left or the right, while the former secretary of state has been bloodied on the political battlefield for decades.

The Sanders problem isn't going away

Image copyright Getty Images Image caption There will be no rematch of the contentious Clinton-Sanders debate in New York last month.

The exchanges over head-to-head polling are just part of the increased tension within the Democratic Party that could be having a negative effect on Mrs Clinton's polling numbers.

Earlier this week, the Clinton campaign announced that it would not take part in a proposed California Democratic debate hosted by Fox News, prompting a stern rebuke from the Sanders team.

Although Democratic officials have made some attempts at peace-brokering, including offering Mr Sanders the chance to name members of key national convention committees, the man who only recently joined the Democratic Party has continued to rankle the party establishment.

On Sunday, for instance, he told a television interviewer he planned to back the candidate challenging Democratic National Committee Chair Debbie Wasserman Schultz in her congressional primary.

On Monday Mr Sanders predicted that the Democratic National Convention would be "messy".

"Democracy is not always nice and quiet and gentle," he added.

Then on Tuesday, the Sanders campaign announced it wanted a review of Mrs Clinton's narrow win in the Kentucky primary one week ago.

Each day brings new evidence that Mr Sanders is not giving up the fight any time soon - no matter how it might affect Mrs Clinton's positioning against Mr Trump.

The demographics are split

Image copyright Getty Images Image caption Hillary Clinton has a decided advantage among women and minorities

Minorities and women are overwhelming supporting Mrs Clinton. Right now that's being balanced out by whites and men who are backing Mr Trump in large numbers.

Exactly how big are these gaps? According to the Washington Post poll, 57% of whites and men support Mr Trump. Mrs Clinton can count on the backing of 69% of non-whites, and leads Mr Trump 52% to 38% among women.

Among whites without a college degree, 65% support Mr Trump versus only 25% for Mrs Clinton.

Meanwhile, many independents are keeping their powder dry. Although their role is often overstated - they usually end up as reliable partisans when all is said and done - there is a small segment of US voters who are truly free agents. And right now many seem to be balking.

According to the Washington Post poll, 48% of self-professed independents are backing Mr Trump, while only 35% support Mrs Clinton. The remaining 18% either want someone else or no one.

The YouGov poll paints a slightly different picture, with Mrs Clinton up 41% to 34% over Mr Trump, but the number not ready to back either - 24% - is equally sizeable.

But it's still early

Image copyright Getty Images Image caption John McCain led Barack Obama in some polls in 2008 - before being soundly defeated

Jimmy Carter led Ronald Reagan in early 1980 presidential polls. Michael Dukakis had a commanding lead over George HW Bush in 1988. John McCain edged ahead of Barack Obama at similar point in the general election cycle in 2008. There were several times in 2012 where Mr Romney had a lead.

In other words, polls this far out from election day - particularly when one of the primary races is settled and the other isn't - aren't particularly good indicators of election-day outcomes.

If Mrs Clinton can consolidate her base - and the key is if - then the current Democratic teeth-gnashing may be overblown.

Mr Trump could be at his polling high-water mark only to see demographics, such as his low standing with women and minorities, and the realities of the state-by-state electoral landscape catch up with him.

But here's where we cut-and-paste those words of caution in every Trump polling story published since last autumn. The normal political rules don't seem to apply to the man. Just because things have happened one way in the past doesn't mean they will play out that way this time.

If admonitions that it's too far out to put much faith in polling sound familiar, it's the same thing people were saying last summer, when surveys had Mr Trump on top in key primary states and nationally.

The only thing we know right now is that, at this moment, Hillary Clinton and Donald Trump are essentially in a dead heat. And Mr Trump has made a lot of pundits and prognosticators look foolish over the past year.