Chief executive Ken Rivers said he was rehearsing what he would say to the media if the vote had failed when the result came through.
Rivers and chairman David Jackson went to Canada last weekend to talk to representatives of Garlow and managed to win their support.
"It was important to get Garlow on board , but we really needed to have the backing of at least two of the majors to get it through."
He said the argument that the project would create $100 million in extra margin and throughput was compelling, as was the refinery's natural ability to undercut imports by virtue of its location.
BP's managing director, Mike McGuinness, said BP had taken a long term view.
"This is a good long-term project for the country, the refinery and for BP," he said.
Z Energy, which is owned by the New Zealand Superannuation Fund and Infratil, said the less-than-unanimous support for the project showed that New Zealand's downstream fuel industry was continuing to evolve and fragment.
"This is consistent with what we are seeing across New Zealand's fuel supply chain, with a reluctance to invest capital in New Zealand's infrastructure and an increasingly tight and fragile supply chain developing as a result.
"We're pleased that this project is continuing because, on balance, we think it has the potential to deliver the cheapest fuel to New Zealand."
The project, which will be funded by debt, comes at a time when many refineries in the developed world are struggling. The upgrade will enable Refining NZ to expand its petrol refining capacity to meet 65 per cent of local needs from the current 55 per cent but the company warned that its dividend payout would fall during the four-year construction period.
The decision removes one uncertainty for Refining NZ but it does not solve the problem of declining margins, which have shrunk to around US$4.17 a barrel from US$11 in 2008.
Had the project not been approved, the company's fall-back position would have been to invest $105 million to replace its current platformer, which dates back to the 1960s.
Refining NZ shares gained 10c to $2.85 once the stock came off a trading halt put in place for the duration of the meeting, but it was still well short of last April's level of $4.56.
The vote
* Refining NZ won 64.5 per cent support for its $365m upgrade.
* Although support from the company's 27 per cent of non-oil company shareholders was almost unanimous at 99.8 per cent, the split between oil company shareholders' votes was 56 per cent for compared with 44 per cent against.