FROM high-definition televisions to low-tech toasters, Elektra, a Mexican retail chain, flogs every conceivable type of electrical gadget to Latin America’s middle class. The company has made a fortune out of selling even modest products on credit, offering payments in monthly instalments to the millions who cannot afford to buy a washing machine outright and do not qualify for loans elsewhere. Elektra’s growth has been boosted by the Azteca financial-services companies, part of the same group. No amount of toaster sales could account for the company’s extraordinary performance last year on Mexico’s stock market. After an uneventful six months Elektra’s share price went through the roof (see chart). Healthy profits in eight Latin American countries helped. But a bigger reason for the sudden spike was a severe scarcity of its shares. About 71% of the company’s shares are held by the family of Ricardo Salinas, a Mexican billionaire. At the time of the share-price surge last year, a further 23% were believed to be tied up in a derivative transaction called an “equity swap”. At the same time the weighting given to Elektra in Mexico’s main stock index, the IPC, had been steadily rising owing to changes in methodology and, later in the year, the delisting of Telmex, Carlos Slim’s huge phone company. Investors trying to match the performance of the market suddenly needed to buy more Elektra shares, and there were not enough to go around. As the shares rose, it only became more important for fund managers to hold them. The boom made Mr Salinas richer than anyone in Mexico apart from Mr Slim. But there followed a bust when, in April, the stockmarket’s managers announced that they would introduce a new way of calculating companies’ weight in the IPC, in which shares that were not in practice tradable would be discounted. Analysts concluded that Elektra might drop out of the index altogether: in two days Elektra’s value fell by almost $7 billion.

With Elektra’s share price restored to pre-bubble levels, it should have been back to business as usual. But the company challenged the new index methodology in the courts, where a local judge decided that Elektra should be exempt from the new rules. In a surprising judgment she held that the American Convention on Human Rights—not generally applied to non-humans—trumped company law.

Her injunction means that when the new index is launched on September 3rd Elektra will be weighted using the old methodology and the 34 other companies on the index will be assessed under the new rules. Elektra will maintain a weighting of 2%; analysts reckon under the new rules it would be nearer 0.9%.

The other companies on the list will lose out somewhat as a result. But the story goes beyond the overvaluation of a toaster merchant. The World Economic Forum gives Mexico one of the best ratings in Latin America for investor protection, better than countries such as Argentina (which recently nationalised a big oil firm). But the Elektra case raises a question-mark. “Are the laws in Mexico applied evenly, or can companies use the legal system to pick and choose what laws are applied to them?” asks Julio Zamora of Citigroup.

The stock-exchange operator will appeal the judgment in higher courts, which could throw out the injunction eventually. Meanwhile, Elektra is suing the operator and its chief executive, Luis Téllez, for unspecified losses incurred following the announcement of the new methodology. Mr Salinas, who in 2006 paid a multimillion-dollar penalty to settle a fraud investigation by America’s Securities and Exchange Commission, neither admitting nor denying wrongdoing, is not accused of any offence in the Elektra case. But investors might think twice about putting their money into a market where local courts can help to determine how firms are valued.