A court has barred sales in Mexico of a controversial Frida Kahlo Barbie doll, ruling that members of her family own the sole rights to her image.

The toy company Mattel launched a range of new Barbie dolls based on "inspiring women" - artist Frida Kahlo among them.

But some of Kahlo's relatives said the manufacturer had used the painter's image without permission.

Her great-niece, Mara Romeo, told AFP news agency that the doll's complexion was too light.

"I would have liked the doll to have traits more like Frida's, not this doll with light-coloured eyes," she said.

After the decision was made, Mrs Romeo told AFP she was "thrilled" and thought justice was "finally being done".

"It should have been a much more Mexican doll," she said, "with darker skin, a unibrow, not so thin because Frida was not that thin... dressed in more Mexican clothing, with Mexican jewellery."

Kahlo was widely regarded as one of the greatest painters of the 20th century, famed for her intimate self-portraits reflecting pain and isolation.

The court's ruling only applies in Mexico and may be appealed, although lawyers for Mattel have not yet commented.

The family told AFP they hope to launch similar action in the US.

Frida Kahlo, who lived from 1907 to 1954, was a member of Mexico's Communist Party in her youth and proudly promoted indigenous Mexican culture through her art.

She also challenged the gender norms of her time by wearing trousers and having relationships with other women as well as with men. Her work also chronicled her painful relationship with her body, disabled through spina bifida, polio and a bus accident.

Her physical disabilities were not represented in the Barbie doll.

Reaction to the doll had been mixed on Twitter.