LONDON – If Will and Kate’s first child is a girl, it’s now clear that she’ll probably become queen one day – and not even getting a little brother can mess that up.

The Commonwealth countries agreed Friday to change centuries-old rules of succession that put sons on the throne ahead of any older sisters.

So that hypothetical daughter of Prince William and Kate Middleton would have a prime place in history: the first princess to beat out any younger brothers and accede to the throne.

Had these rules been in place in the 1500s, Henry VIII would have just been a rather large historical footnote.

“This is a simple act of modernization and one that is right for our time,” British Prime Minister David Cameron told the BBC.

The move is a baby step: Before taking effect, the changes still must be approved by the legislatures of the 16 nations where Queen Elizabeth II is head of state. Still, the agreement, which was reached at a meeting of Commonwealth nations in Perth, Australia, represents a triumph over outdated, sexist practices.

Nations including Sweden, Belgium, the Netherlands and Norway have already taken similar steps.

“The great strength of our constitutional approach is its ability to evolve,” Cameron said. “Attitudes have changed fundamentally over the centuries, and some of the outdated rules, like some of the rules of succession, just don’t make sense to us any more.

“The idea that a younger son should become monarch instead of an elder daughter simply because he is a man, or that a future monarch can marry someone of any faith except a Catholic – this way of thinking is at odds with the modern countries that we have become,” Cameron added.

Will and Kate’s lavish April wedding renewed a decades-long debate over succession.

Middleton told a well-wisher in Canada this summer that she hopes to start a family. William has said the same.

Once their honeymoon was over, baby talk started, adding urgency to the dialogue, although officials insist that talk of a pregnancy is premature.

Historians think it’s about time the monarchy entered the modern world.

“You shouldn’t muck around too much with the constitution, but it’s a good idea to change this at this time,” said royal expert Hugo Vickers. “It’s much better to have it sorted out before any babies come along.”

The new rules would apply only to future heirs and would have no impact on the current line of succession.

William is second in line to the throne after his father, Prince Charles, who is the queen’s firstborn child. Charles’ sister, Anne, is lower in the line of succession than her younger brothers, Andrew and Edward, by virtue of their male gender.

Charles had only sons, William and Prince Harry, so the issue of gender was never raised.

In 2009, the government of then-Prime Minister Gordon Brown considered a bill that would end the custom of putting males ahead of females in the succession line. It also would lift a ban on British monarchs marrying Roman Catholics. The government did not have time to pursue it before Brown left office.

The rule has kept women from succeeding to the throne in the past. Queen Victoria’s first child was a daughter — also called Victoria — but it was her younger brother who became King Edward VII.

If Queen Victoria had been able to pass her crown to her firstborn, Britain’s Princess Victoria would have had a brief reign before her death in 1901.

That would have made her son — Wilhelm II, who at that time was the German kaiser — king. With Wilhelm II ruling both Germany and Britain, there may not have been two world wars.

Earlier history might also have been drastically different if women had had equal rights to the throne.

Neither Henry VIII nor Charles I would have been king because both had older sisters who, under the new rules, would have been monarch.

As king, Henry VIII set in motion the creation of the Church of England. His six marriages left an insecure succession — one sickly son and two princesses, according to the monarchy’s official website. Charles I’s reign in the 17th century led to a bloody civil war.

Prince William and his wife have been credited with freshening up a staid monarchy, and new succession rules seem to fit right in.

“In this day and age, why should a royal son be more important than a royal daughter?” said Joe Little, managing editor of Majesty magazine.

“In terms of ability, I don’t think women are any different than men,” said Jill Gregory, 71, pointing to the queen and her late mother.

Elizabeth II succeeded her father, King George VI, because he had no sons. If she had had a younger brother, he would have jumped above her in the line of succession.

The British prime minister had pushed for the changes, calling it a matter of equality.

New Zealand will now chair a working group of Commonwealth countries to discuss how to accomplish the reforms. It’s not a simple process. Getting all 16 countries to begin the legislative changes is what has held them up for decades.

However long it takes, Patricia Wager of London said it should not be an issue in the modern world.

“It’s a good idea, and a long time coming,” she said.

— The Washington Post contributed to this report.