Insurance companies cannot take gender into account when setting premiums and paying out benefits from annuities and retirement savings or accident cover, the European Union's top court ruled Tuesday.

The ruling by the European Court of Justice could increase the costs of women's accident insurance and boost their retirement income, though it could also make men worse off, with major implications for the insurance sector.

Taking the gender of the insured individual into account as a risk factor in insurance contracts constitutes discrimination, the court said in a statement.

The rule of unisex premiums and benefits will apply with effect from December 21, 2012, it said.

The ECJ judges agreed with an interim opinion of Advocate General Juliane Kokott last September that an EU directive was invalid in allowing different premiums and benefits for men and women based on the use of their gender in assessing their statistical risks.

The transitional period would allow EU member states to decide what action to take on domestic laws and give companies a chance to adjust and find ways to mitigate the knock-on effect.

Insurance analysts say the ruling could boost women's retirement income by up to 10 percent.

Insurers currently pay retired men who have purchased an annuity more than women, on the basis that on average they die younger -- on average three years earlier.

Ending the gender disparity in annuities will affect insurers like Britain's Legal and General and Prudential, France's Axa and Allianz of Germany.

The ruling could also mean insurance providers would try to find alternative ways to discover an applicant's gender without asking directly, so they have a more accurate picture of their risks, according to one insurer who declined to be identified.

(Additional reporting by Cecilia Valente and Sarah Mortimer in London; Editing by Rex Merrifield, Greg Mahlich)