MONTREAL - Quebec's highest court has authorized a class-action suit on behalf of men who took medication for hair loss and then allegedly suffered various problems, including erectile dysfunction.

The Quebec Court of Appeal gave the go-ahead Thursday, reversing a lower court decision.

It covers Quebec men who took one of two drugs before Nov. 18, 2011, and then allegedly developed problems, including erectile dysfunction, lower libido levels, ejaculation issues, shrinkage of the genitals, and difficulty in having an orgasm.

The defendants are Merck Canada and Merck Frosst Canada, which sold the Propecia and Proscar prescription drugs.

Propecia is used mainly to treat baldness, while Proscar is used primarily for hypertrophy -- the enlargement of an organ or tissue.

Quebec Superior Court turned down the request for the lawsuit in 2016.