Doctors mistakenly told a British couple that they had a newborn girl, who were shocked to find that 'she' was actually a boy five weeks later.
Mum Claire Robson was called in by an apologetic consultant after more than a month buying pink clothes for her baby - who had been officially named Olivia.
She was shocked to be told her under-developed 1lb 10oz daughter - still in an incubator after being born 11 weeks prematurely - was a son.
Claire, 21, cuddled her baby - now renamed Dylan - she said: "I just burst into tears. It's taken a bit of getting used to.
"But I love Dylan just as much. He's the same baby," the Sun quoted Claire as saying.
Claire, of Brandon, Durham, said: "They were as staggered as we were."
She told how even when she had a scan before the birth, medics told her she was having a girl.
Six days later she underwent an emergency Caesarean delivery at Sunderland Royal Hospital amid fears for the baby.
As the child was born, the new mum asked: "Is it a girl?" Claire said: "The doctor replied, 'Yes'. From that point onwards everyone kept calling the baby a she. Because Dylan was born so early he wasn't fully developed - that's why no one could tell.
"As he got a few weeks older it became apparent. The consultant called us in, told us to sit down and said, 'Your baby's actually a boy, not a girl'. We were stunned."
She joked: "It must be the earliest sex change in history."
The mistake was compounded by the baby suffering from a genital abnormality called hypospadias. Dylan will need ops on his manhood to correct it - but his parents have been assured all will be fine.
They now have a new birth certificate naming Dylan.
Dad Andrew, a baker, said of suddenly having a son: "I'm thinking towards the day I can buy him a Scalextric."
Last night urology expert Dr Geoff Hackett confirmed: "The genitals develop later during pregnancy. When a baby is as small as this one and born so prematurely, it makes it more difficult to be certain."