Pro-whaling nations have won their first vote towards the resumption of commercial whaling for 20 years.
Japan has some way to go before commercial whaling can begin
The International Whaling Commission meeting backed a resolution calling for the eventual return of commercial whaling by a majority of just one vote.
Japan said the outcome was "historic", but it does not mean a lifting of the 1986 ban - that would need support from three-quarters of the commission.
Anti-whaling countries say they will challenge the decision.
Conservation groups have expressed dismay, with the International Fund for Animal Welfare (Ifaw) saying anti-whaling nations needed to work harder to prevent the ban eventually being overturned.
Japan and other pro-whaling nations want to move the International Whaling Commission (IWC) away from conservation and towards managing whale numbers.
The resolution declared: "The moratorium, which was clearly intended as a temporary measure, is no longer necessary."
It was tabled by six Caribbean nations, including St Kitts and Nevis, where the annual IWC meeting is being held.
The resolution was approved by a vote of 33 to 32, with one member - China - abstaining.
Although the ban aimed at protecting the endangered species is still in place, there is no doubt commercial hunting is a step closer, the BBC's Richard Black in St Kitts says.
Ifaw spokesman Joth Singh described the decision as a "wake-up call" for countries which claimed they cared for whales.
"It is clear that the intent is for the IWC to revert back to a whalers' club, which is what it was up to the 1970s," he said.
HOW NATIONS VOTED
Pro-whaling: Includes Japan, Norway, Denmark, Iceland, Russia, Morocco, Cambodia
Anti-whaling: Includes UK, US, Brazil, Australia, New Zealand, Finland, France, Spain, Germany, Israel
After the vote, Brazil and New Zealand said they would challenge the resolution.
"This is the most serious defeat the conservation cause has ever suffered at the IWC," New Zealand Conservation Minister Chris Carter told AFP news agency.
"It has been a significant diplomatic victory for Japan."
Some conservationists have singled out Denmark for particular attention, after it voted with Japan despite being a European Union member, our correspondent says.
As well as St Kitts and Nevis, the resolution was drafted by St Lucia, St Vincent, Grenada, Dominica and Antigua.
Chris Carter (R) said the anti-whaling bloc would regroup
It says whales consume large quantities of fish, which those backing the overturning of the ban say makes whaling an issue of food security - a view dismissed by anti-whaling campaigners.
Tokyo believes whale numbers have risen sufficiently to allow the hunting of certain species.
But Japan's Deputy Whaling Commissioner Joji Morishita said any future commercial whaling would be on a much smaller scale than in the past.
"It's not going back to the commercial whaling, it should be the beginning of sustainable whaling, plus protection of depleted and endangered species," he said.
The slim victory for Japan followed its defeat in four other votes at the IWC meeting, including a proposal to end work on the conservation of small cetaceans such as dolphins and porpoises.
Environmental groups have accused developing countries of voting with Japan on whaling issues in return for money for fisheries projects - claims which have been repeatedly denied by all the countries involved, the Associated Press news agency says.
Currently, Japan and Iceland kill whales under an IWC ruling which allows nations to catch whales for "scientific research".
Norway, which formally objected to the 1986 ban, openly conducts commercial whaling.