The end is near for Harry Potter fans, and if advanced ticket sales are any indication, opening B.O. numbers for “Harry Potter and the Deathly Hallows: Part 2” will be wicked.

“Part 2” has already earned a reported $25 million in advanced domestic ticket sales, the majority for midnight screenings, according to Warner Bros.

The amount of early coin suggests the film could match — if not surpass — the previous midnight benchmark set by “The Twilight Saga: Eclipse,” with $30 million in latenight grosses. (Warners said “Part 2” will likely end up with an additional $5 million-$6 million in advanced ticket sales before Friday.)

According to online ticketing service Fandango, pic has sold out more than 5,000 Stateside showtimes prior to its release.

Warners distribution topper Dan Fellman projected a three-day opening of $130 million-$140 million but said there’s potential for the film to break the $158 million debut record set by “The Dark Knight” in 2008. That depends, however, on how well the film holds from Friday to Saturday — and whether fans turn out for 3D screenings.

“If 3D is at the 50% level, then the uplift is going to push (the film) into an interesting place,” Fellman said.

Fellman said a 20% drop from Friday to Saturday (40% is more typical for frontloaded fan-driven pics) would put “Potter” at the high end of weekend expectations.

Aud interest for “Part 2” had been steadily increasing over the past few weeks without peaking until just recently, according to bizzers. That’s good news for Warners since studios never want a pic to hit its high point too far ahead of its release.

“They’ve done an excellent job of making sure their campaigns peaks at just the right time,” said Imax prexy Greg Foster.

Imax will play “Hallows: Part 2” at all domestic locations but one, along with the vast majority of its international runs — giving it approximately 425 worldwide Imax runs, a new record. Pic bows day-and-date this weekend in every major overseas market except China, where the film launches Aug. 4.