Media playback is unsupported on your device Media caption Royal historian Kate Williams: ''This child will come to the throne as the king or queen''

The Duchess of Cambridge is expecting a baby, St James's Palace has announced.

Members of the Royal Family and the duchess's family, the Middletons, are said to be delighted.

A spokesman said the duchess, who is thought to be less than 12 weeks pregnant, has been admitted to a London hospital with acute morning sickness and is likely to stay for several days.

The baby - the couple's first - will be born third in line to the throne, after Prince Charles and Prince William.

Catherine and William, who are both 30, were married at Westminster Abbey in April 2011.

Analysis As with William and Kate's wedding, this pregnancy will be played out both on a private and a very public stage. It was the great unsaid. As one historian put it, the first "duty and ambition" of someone in the duchess' position was to produce an heir. Marriages and births are crucial to the very survival of the ancient institution. When the baby is born, Prince Harry's importance reduces and he relinquishes the position of third-in-line to the throne. Even if it's a girl, the government is insistent she will be head of state of Britain and, as things stand, 15 other countries where the Queen still reigns. The law will be changed, they say, to ensure she would not be overtaken by any younger brother. The hope in royal circles will be that the future of the monarchy has now been secured for another generation.

BBC's royal correspondent Peter Hunt said William and Kate were staying at her parents in Berkshire at the weekend and travelled to the private London hospital from there by car.

William spent several hours with his wife but left the King Edward VII hospital shortly after 20:00 GMT.

It is understood that Kate is being cared for by gynaecologist Marcus Setchell, who delivered the Countess of Wessex's two children.

The duchess was last seen in public on Friday when she visited her old school, St Andrew's, in Pangbourne in Berkshire.

In a statement, St James's Palace said: "Their Royal Highnesses the Duke and Duchess of Cambridge are very pleased to announce that the Duchess of Cambridge is expecting a baby.

"The Queen, the Duke of Edinburgh, the Prince of Wales, the Duchess of Cornwall and Prince Harry and members of both families are delighted with the news."

It said the duchess was suffering from hyperemesis gravidarum, which requires supplementary hydration and nutrients.

"As the pregnancy is in its very early stages, Her Royal Highness is expected to stay in hospital for several days and will require a period of rest thereafter," it added.

Image copyright PA Image caption The media gathered outside the central London hospital after the announcement

St James's Palace refused to be drawn on when the royal couple became aware of the pregnancy, only saying "recently".

But it is understood the palace announcement was prompted by the Duchess's medical condition.

The Queen, Prince Charles and other members of the Royal Family were only told about the pregnancy earlier in the day, our royal correspondent said. Prince William's brother Prince Harry, who is serving with the Army in Afghanistan, is thought to have been told about pregnancy in an e-mail.

Daghni Rajasingham, a consultant obstetrician, told BBC Radio 4's PM programme the sickness will continue throughout the pregnancy in a "very small" number of cases and may result in future re-admission to hospital

"But in terms of any particular complications, if it's treated well and they're kept well hydrated it's something that is relatively easy and well treated."

Asked about having children in an interview after their engagement in November 2010, William said: "I think we'll take it one step at a time. We'll get over the marriage thing first and then maybe look at the kids, but obviously we want a family."

Severe morning sickness It is not uncommon for pregnant women to experience morning sickness, particularly during the first few months of pregnancy. But some women (around one in every 200) experience severe nausea and vomiting, which continues throughout pregnancy. This condition is known as hyperemesis gravidarum or HG and needs specialist treatment and often requires a stay in hospital. The main danger is dehydration - it can be difficult to keep enough fluid down orally. Doctors can treat HG with medication to help ease the nausea. HG is unlikely to cause harm to your baby. However, if it causes weight loss during pregnancy there is an increased risk that your baby may be born with a low birth weight. Severe morning sickness can be 'traumatic'

Prime Minister David Cameron wrote on Twitter that he was "delighted by the news...They will make wonderful parents."

Labour leader Ed Miliband tweeted: "Fantastic news for Kate, William and the country. A royal baby is something the whole nation will celebrate."

A spokesman for the Royal Air Force, with which William serves as a search-and-rescue pilot, said: "The RAF is delighted with the news and wishes the Duke and Duchess of Cambridge all the best for the future."

William's uncle Earl Spencer, the brother of Princess Diana, said the pregnancy was "wonderful news and I am thrilled for them both".

The Archbishop of Canterbury, who married the couple, said: "The whole nation will want to join in celebrating this wonderful news. We wish the Duchess the best of health and happiness in the months ahead."

Image copyright PA Image caption The Duchess was last seen in public on 30 November

The White House also paid tribute.

President Barack Obama's press secretary Jay Carney said: "On behalf of everyone here... beginning with the president and first lady we extend our congratulations to the Duke and Duchess of Cambridge on the welcome news we received from London that they are expecting their first child."

Royal journalist Ingrid Seward said the royal pair were likely to have wanted to start a family "sooner rather than later", but delayed so that they could play their part in honouring the Queen's Diamond Jubilee.

She told the BBC: "Kate will be 31 in January and I think by royal standards that is relatively old."

In October 2011, Commonwealth leaders agreed to change succession laws so that the daughter of any future UK monarch will have equal right to the throne as a son.

The law has not yet been altered but a Cabinet Office spokesman says formal consent is expected "very shortly" and ministers have indicated that the legislation will apply to any royal births from the date of the leaders' decision.

The monarch is also head of the armed forces, supreme governor of the Church of England, head of state of the UK and 15 other Commonwealth countries.