They once helped create an empire that spanned the globe, but now members of the Spanish aristocracy are engaging in a more prosaic struggle over whether their titles should be inherited by women.

A group of grandees and other nobles have rebelled against a recent change in Spain's law which prevents a son from claiming the family title if he has an elder sister. They are demanding that the country's constitutional court strike the law down, as it may allow some women to claim titles retroactively from brothers or uncles who currently hold them.

They claim the law was tailor-made to suit a group of powerful women, including the designer Agatha Ruiz de la Prada, who claimed titles held by male relatives. Ruiz de la Prada claims the title of Marquess of Castelldosrius from an uncle who received it from his elder brother – skipping Ruiz de La Prada's now deceased mother.

"The law should not be retroactive. There will be fights in all the noble families because of this," said Miguel Temboury of the Spanish Nobles Association, a recently created conservative faction within Spain's 2,500-strong nobility.

They say Ruiz de la Prada and her partner, the El Mundo newspaper editor Pedro J Ramírez, used their influence with José Luis Rodríguez Zapatero's socialist government to make the law retroactive.

Under the terms of the new law those like Ruiz de la Prada, who had already brought legal cases against current holders of titles, are able to pursue their claims.

Ruiz de la Prada denied that she and Ramírez had pushed the government into changing the law. "I wish I did have that much influence with the prime minister," she said. "One of the best things he has done has been to pursue equality."

"They are blinded with rage about this," she said of the rebel nobles. "In their little world, this is what is important to them."

Ramírez also denied pressing the government: "I might have commented on this informally to politicians, but it was the mummified old aristocrats who actually held formal meetings with political parties to try to stop the law being changed."

The new law was introduced after Spain's highest courts ruled in favour of male primogeniture, despite attempts by a group of some 20 women to have it banned for contravening gender equality laws.

"There has been 20 years of fierce fighting over this," said Ms Ruiz de la Prada. "I only joined it towards the end. " Zapatero's party brokered a cross-party agreement to change the law two years ago.

A number of court cases are being fought between siblings for family titles. "My elder sister and elder brother have fought," said Temboury, whose family are Counts of Labajos and Las Infantas.

He estimated that more than 1,000 families were having to face the fact that sons who thought they would inherit titles would now see them go to older sisters.

The grandees have also tried to drag King Juan Carlos into the row. "We beg your attention and understanding in finding a solution that will resolve the violation perpetrated on us," they wrote to him. The rebels see the fact that male primogeniture survives in the royal family, regardless of the fact that the current king's oldest child is a daughter, as one reason for striking down the law.

"We feel the monarchy and the nobility should go hand-in-hand," said Mr Temboury. At a tense meeting of the Disputation of Grandees, as the official club for Spanish nobles is known, King Juan Carlos made it clear that he did not back the rebels. "The new regulations for noble titles should make you look to the future," he said in a letter to those congregated there in March.

King Juan Carlos's heir, Prince Felipe, has two daughters. The Spanish constitution would have to be changed if a son were born to allow the elder daughter to inherit the crown.