Spain's politically correct government, which legalised gay marriage and simplified divorce proceedings, is now taking aim at a subtle form of machismo: male predominance in Spain's double-headed surnames.

Traditionally in Spain, babies are given two surnames at birth: the first is the father's and the second, the mother's. This causes endless confusion in English-speaking, single-surname countries, but it explains why the names of Spanish leaders and celebrities – from Prime Minister Jose Luis Rodriguez Zapatero to tennis legend Arantxa Sanchez Vicario – take so long to pronounce. It also comes in handy when identifying people born to fathers with common surnames such as Garcia and Perez, the Spanish equivalents of Jones or Smith.

In the Spanish naming game, the first position is most important, and until recently, that honour has been bestowed automatically on the father. But the socialist government of Mr Rodriguez Zapatero (Rodriguez comes from the Prime Minister's father, Zapatero from his mother) is drafting a new law under which a baby's two surnames will be ordered alphabetically unless the parents specify otherwise. The law also eliminates years of bureaucracy needed to change the surname order after the child is born.

"This measure is a logical consequence of the principle of equality between men and women," said the Justice Minister, Francisco Caamaño, whose second last name is Dominguez.

And for some people, name order is more than a feminist symbol. Consuelo Abril, president of COMPI, an umbrella group of women's equality organizations, said: "For the children of women who were killed or beaten by their spouses, it is a true drama to carry the last name of that abuser."

Some legal experts say the new rule could cause surnames at the end of the alphabet to become extinct, but Mr Caamaño believes most couples will likely come to an agreement before the library-like system is imposed. "The alphabetical ordering will be usedonly in case of parental disagreement," he said. Although parent have billing on the national ID card, most Spaniards are known simply by their first surname, such as director Pedro Almodovar, whose full name is Pedro Almodovar Caballero. His mother's contribution to his birth certificate never makes the film credits.

In fact, the name that appears in second place is usually relegated to the status of the mother's maiden name in Britain – convenient for bank identification but little else – unless it is more interesting than the father's. The full name of actor Javier Bardem, is Javier Encinas Bardem. According to Spanish custom, he should be known as Javier Encinas. But by using his mother's name, Bardem, he declares his membership in the Bardem acting dynasty.

While making progress on the equality front, the alphabet legislation fails to solve the dilemma of single mothers, who must still figure out how to fill in the blank on the civil register form reserved for the father's last name. They are usually forced to invent one. The names of singers such as Ricky Martin or Julio Iglesias are especially common, according to El País newspaper. It is not clear how gay partners should proceed.

Under the late dictator General Francisco Franco, first names were obligatorily chosen from an approved list of saints.Now the new the legislation will even spare couples from declaring whether their baby was born out of wedlock, a requirement since 1957. "The law is more in synch with our times," a Justice Ministry spokeswoman said.

Javier Encinas Bardem

The actor is more commonly known as Javier Bardem, but uses his mother's surname because she is part of an acting dynasty.

Penelope Cruz Sanchez

The actress has always gone by Penelope Cruz professionally. She has said that when she has her baby, her mother's last name, Sanchez, will not reach the next generation.

Jose Luis Rodriguez Zapatero

The Spanish Prime Minister is usually referred to by his mother's last name, Zapatero, because the name Rodriguez is so widspread.

David Villa