Shareholders voted 837.9 million shares in favour and approximately 792.6 million shares against, with an "insignificant" number of votes that were cast still unresolved, HP said.
The tally by IVS Associates is subject to a recount if demanded by either side, according to HP spokeswoman Rebeca Robboy. If HP acquisition opponent Walter Hewlett demands a recount, both parties would participate in a review of the proxies voted, HP said in the statement. That review probably would begin immediately and last about a week.
HP's proposed acquisition of Compaq has become the subject of a heated battle between HP management and Hewlett, who is the son of company co-founder William Hewlett.
HP chairman and chief executive officer Carly Fiorina is confident that HP will be able to move forward with the deal on schedule and launch the new company in early May, according to a message she sent on Wednesday to HP employees, which was also released to the media.
In a statement, the William R. Hewlett Revocable Trust, which has opposed the merger, called the margin in the vote "extremely narrow".
"These are preliminary results and both sides will have the opportunity to examine and challenge the proxy tabulation prior to final certification. In addition, the pending litigation with Hewlett-Packard in the Delaware Chancery Court must be heard before any final outcome is determined," the statement said.
As reported, the trust filed a complaint against HP last month in a bid to block the merger, in which it took issue with the way HP solicited votes to approve the deal. A trial in that case is scheduled to begin 23 April, the trust said
The opponents' next course of action will be to review the proxies, according to Todd Glass, a spokesman for Walter Hewlett.
"We will begin examining the votes and challenge the ballots if we need to," Glass said. Hewlett's team will look over the votes and check signatures, dates and other relevant items.
The outcome of the preliminary vote matched Hewlett's expectation that the margin would be "razor thin", Glass said.
If the opponents were to conduct such a review, HP attorneys would join in that process, along with IVS's own inspectors and proxy solicitors from a third party whose job is to manage the voting process, HP's Robboy said.
In her message to HP employees, Fiorina said she was confident that HP would prevail in the court case. The company also is co-operating fully with investigations by the US Attorney's Office and the US Securities and Exchange Commission that stem from the lawsuit.
"We waged this proxy contest openly, fairly and lawfully, and we won the merger vote on its merits," Fiorina said in the statement.
Most of the votes against the merger came from shareholders affiliated with the Hewlett and Packard families and the foundations with which they are associated, according to HP. Shareholders not affiliated with those parties voted in favour of the deal by a margin of roughly two to one, HP said.
If there is no recount, IVS later will produce a final tally, which is then subject to a challenge process that would take another one or two days, the statement said.
Despite the preliminary tally of votes, investors and customers would probably have to wait until Hewlett's legal push against the merger has run its course before they will know for sure whether the companies will join together, he added.