Sophie lost a baby in 2001 after an ectopic pregnancy
The Countess of Wessex is pregnant, Buckingham Palace has announced.
A statement from the palace said: "Their Royal Highnesses the Earl and Countess of Wessex are very pleased to announce that the Countess of Wessex is expecting a baby in December.
"The Queen and the Duke of Edinburgh and members of both families are delighted with the news."
A spokeswoman for the countess said Sophie, 38, was feeling a "little tired" but was "absolutely fine".
She added: "Sophie and Edward are absolutely thrilled and excited with the news."
The countess will not be undertaking official engagements for the time being on doctors' advice.
Edward continued with Tuesday's duties alone and visited a centre for adults with learning disabilities in Devon. He thanked well-wishers who congratulated him on the news.
He said: "I am just very sorry that my wife can't
actually be here. She has been told that she has got to take it very easy. That is the doctor's orders and she is not going to disobey."
I am just very sorry that my wife can't
actually be here. She has been told to take it a bit easier
The child will be the Queen's seventh grandchild and eighth in line to the throne.
The announcement follows the trauma of a failed pregnancy in December 2001 when the countess was airlifted to hospital after suffering an ectopic pregnancy.
Surgeons operated to remove the foetus from her fallopian tube after she was rushed to King Edward VII Hospital by air ambulance.
Sophie was 36 at the time and doctors said that if the condition had continued undiagnosed, it could have been life-threatening.
Prince Edward was congratulated by well-wishers
She later spoke of her sadness at losing their first baby but said she was optimistic the couple could still start a family.
"I'm obviously very sad, but it was just not meant to be," she said.
"But there will be other chances."
The good news also follows the couple's struggle to combine high profile jobs in television and public relations with royal duties since they married in 1999.
In 2001 the countess was recorded making indiscreet remarks about several public figures by an undercover tabloid reporter.
She then gave a newspaper interview in which she spoke about her husband's sexuality, stating "my Edward's not gay".
Later the same year the Earl of Wessex had to apologise after a row about filming at Prince William's university when other media organisations agreed not to film the student prince.
Succession to throne
1: Charles, the Prince of Wales
2: Prince William
3: Prince Harry
4: Andrew, the Duke of York
5: Princess Beatrice
6: Princess Eugenie
7: Edward, the Earl of Wessex
8: Edward and Sophie's child
In March last year the couple announced they would fulfil current obligations with their separate companies before leaving.
The reason for their decision was to support the Queen during her Golden Jubilee, but the move was considered to be permanent.
BBC correspondent Peter Hunt said that as doctors consider Sophie to be an "older mum" she is expected to rest at home until the birth.
Recent media reports have suggested that Sophie had undergone IVF treatment to get pregnant.
Buckingham Palace would not comment on the reports.
Sophie said before her first pregnancy that she hoped to have a boy and a girl, and that she would consider undergoing IVF treatment to conceive.
'Not too late'
She said she did not believe she had left it too late to have children.
"I think if I was going to have five or 10 I should have started an awful long time ago," she told the News of the World.
"But if I'm lucky enough to have any, one of each would be nice.
"I certainly don't think I have left it too late. I would explore all avenues and I certainly wouldn't rule out IVF."