Image copyright Getty Images Image caption The first child of the Duke and Duchess of Cambridge, whether a boy or a girl, will succeed the throne after Prince William

All Commonwealth realms have agreed to press ahead with a bill ending discrimination against women in the succession to the British throne.

Deputy Prime Minister Nick Clegg said the government would now introduce the Succession to the Crown Bill in the House of Commons as soon as possible.

It means the first child of the Duke and Duchess of Cambridge will become monarch, whether a boy or a girl.

The pregnant duchess is in hospital but is feeling better, royal officials say.

Catherine, whose pregnancy was announced on Monday, is spending her second day being treated for acute morning sickness - or hyperemesis gravidarum - in the private King Edward VII Hospital in central London.

A St James's Palace spokesman said: "The Duchess of Cambridge is continuing to feel better. She and the Duke are immensely grateful for the good wishes they have received. She will remain in hospital at present."

Her husband Prince William, who spent several hours visiting her on Monday, spent the day with her again on Tuesday. He headed straight into the hospital without speaking to the assembled media when he arrived.

The duchess was also visited by her main doctor Marcus Setchell and the royal gynaecologist Alan Farthing.

She is less than 12 weeks pregnant, and no due date has yet been announced for the baby.

'Old-fashioned rules'

The new legislation will end the principle of male primogeniture, meaning male heirs will no longer take precedence over women in line to the throne.

It will also end the ban on anyone in the line of succession marrying a Roman Catholic.

The legislation was agreed in principle at the Commonwealth heads of government meeting in Perth, Australia in October 2011.

Media playback is unsupported on your device Media caption Deputy Prime Minister Nick Clegg said the change in rules of succession is something ''that many people would welcome''

Since then, the government of New Zealand has been gathering formal letters of consent from the 15 realms of the Commonwealth, that have the Queen as their head of state.

They have confirmed they will be able to take the necessary measures in their own countries before the UK legislation comes into effect.

In a statement, Mr Clegg described the agreement as an "historic moment for our country and our monarchy".

He added: "People across the realms of the Commonwealth will be celebrating the news that the Duke and Duchess of Cambridge are expecting their first child.

"We can also all celebrate that whether the baby is a boy or a girl, they will have an equal claim to the throne."

The 16 realms of the Commonwealth United Kingdom, Antigua and Barbuda, Australia, The Bahamas, Barbados, Belize, Canada, Grenada, Jamaica, New Zealand, Papua New Guinea, Saint Kitts and Nevis, Saint Lucia, Saint Vincent and the Grenadines, Solomon Islands, Tuvalu.

He said the bill would write down in law "what we agreed back in 2011 - that if the Duke and Duchess Cambridge have a baby girl, she can one day be our Queen even if she later has younger brothers".

The succession bill will require amendments to some of Britain's key constitutional documents, including the Bill of Rights and Coronation Oath Act of 1688, the 1701 Act of Settlement and the 1707 Act of Union between Scotland and England.

In a statement on Monday, St James's Palace announced the duchess's pregnancy and said members of both the Royal Family and the Middleton family were "delighted with the news".

But, the palace would not reveal when the royal couple had become aware of the pregnancy, only saying "recently". It is understood the announcement was prompted by the duchess's medical condition.