EU leaders have agreed a deal that will allow the UK to scrap the so-called "tampon tax", British officials say.
Two options have been put forward that would permit a zero rate of tax on sanitary products.
It comes amid the threat of a backbench rebellion following the Budget from Eurosceptic MPs over the tax, currently at the lowest rate allowed by EU law.
Chancellor George Osborne said the government "heard people's anger over paying the tampon tax loud and clear".
VAT is currently charged at the reduced rate of 5% on sanitary products - but more than 300,000 people have signed a petition calling for sanitary items to be exempted from tax altogether.
Mr Osborne had pledged to spend the proceeds of the tax on women's charities.
"We said we'd use the money to benefit women's charities and we've already distributed £17m to good causes across the country," he said.
"At the same time we said we'd fight for agreement to reduce the VAT rate to zero, and tonight all European leaders have welcomed our plan to do just that. We've achieved what no British government has even tried to achieve.
"It just shows how Britain can make a case for a reform that will benefit millions as a powerful, confident voice inside a reformed EU."
At the European Council summit in Brussels, the 28 leaders agreed a statement welcoming "the intention of the Commission to include proposals for increased flexibility for member states with respect to reduced rates of VAT, which will provide the option to member states of VAT zero-rating sanitary products".
BBC chief political correspondent Vicki Young said it appeared the government had managed to avoid a Commons defeat by reaching the agreement.
By BBC political correspondent Ben Wright
A great British victory or an obvious bit of spin? Number 10 says David Cameron has come to Brussels and won the backing of all EU leaders for his plan to abolish VAT on women's sanitary products.
With the EU referendum looming, the long-running campaign to get tampons zero rated is pulling in support from Tory MPs backing Brexit. A dicey vote on the finance bill loomed next week. Now the European Commission may have defused this political problem.
For months it has been listening to EU member states complain the existing EU rules on reduced and zero-rated VAT are too rigid and past their sell by date. The UK, of course, has a particular complaint about not being allowed to cut VAT on tampons below 5% and has asked for change.
Earlier, the Commission confirmed it will publish its "Action Plan" on VAT next Wednesday. It would include two options for change that would allow countries more flexibility over VAT. Hours later, Number 10 trumpeted that a line will be included in the Council conclusions stating EU leaders welcome the Commission's move "which would provide the option to member states of VAT zero rating for sanitary products".
So at some point down the line, the government looks set to scrap VAT on tampons. The EU has moved. But it was likely to do so whether David Cameron lobbied for the move here at this summit or not.
A number of Conservative MPs have threatened to vote for an amendment to the Finance Bill in the Commons on Tuesday to allow the zero-rating of women's sanitary products.
Those campaigning for Britain to leave the EU in 23 June's referendum have been keen to highlight the role of Brussels in setting VAT rates.
Mr Cameron raised the issue with European Commission president Jean-Claude Juncker at the start of the EU summit, Downing Street said.
Labour MP Paula Sheriff, who has tabled the Finance Bill amendment, said: "Women's sanitary products are not a luxury. George Osborne failed to take the opportunity in his Budget to say that he would take the action called for by Labour and feminist campaigners and seek to get the 'tampon tax' abolished."
The European Commission said it was working on two options that would allow member states more flexibility over setting VAT rates.
A Commission spokeswoman said: "EU VAT rules are not imposed by the European Commission. They are decided on and agreed unanimously by member states.
"Contrary to some media reports, tampons do benefit from reduced taxation."
She added that under current rules, member states were not allowed to apply a zero VAT rate to a product unless all other member states agreed.
"Zero rates are an exception and run against generally accepted VAT principles. Most member states tax sanitary products like tampons at around 20% or more," she added.