The truth only emerged after the ex-husband of one of the mothers refused to pay maintenance for their daughter, saying she looked nothing like him.
DNA tests in the Kopeisk town showed she was not related to the parents.
Police later traced the girl's natural parents, who were found to have been raising the other family's child. Neither girl wants to leave her home.
The two families in the town in the Ural Mountains are now demanding 5m roubles (£101,000: $158,300) in damages.
But they cannot press criminal charges against individual staff because so many years have passed since the babies were handed to the wrong parents.
When Yuliya Belyaeva got a divorce earlier this year, her former husband refused to pay alimony. He did not believe that he was the father of their daughter, Irina.
So Ms Belyaeva took him to court. The judge ordered DNA tests to be carried out. Those tests revealed an astonishing truth.
"We did two DNA tests," Yuliya told me by telephone from her home town. "Both tests showed that neither my ex-husband nor I were Irina's biological parents."
"The judge couldn't believe it. She said she'd only seen cases like this on TV and didn't know what to advise us."
Ms Belyaeva thought back to December 1998 and the day she had given birth to Irina.
She remembered there had been one other woman in labour in her ward. She realised there had been a terrible mix-up: 12 years ago the two babies had been given the wrong name tags. And the wrong set of parents.
"I made a photocopy of the DNA test results and went straight to the prosecutor's office. There I lodged an official complaint about being given the wrong baby in the maternity hospital."
Investigators began a search for the other mother. They found her across town.
"It was true," recalls Ms Belyaeva. "Their daughter, Anya, was blond and looked just like me and my ex-husband. And our daughter was dark-skinned and had dark hair and looked like the other father. He's a Tajik, and she looked just like him."
"Suddenly my whole world turned upside down and inside out.
"I always thought that Irina looked a little bit like my mother-in-law. She had dark hair, too, and dark eyes. It never occurred to me that Irina wasn't my real daughter. I never believed doctors could make that mistake."
If it was a surprise to the parents, it was an even greater shock for the two girls.
"It's terrible for both of them," Ms Belyaeva says. "They've grown up with one set of parents, now they've found out they have a different mother and father.
"Neither child wants to leave their home. Irina keeps saying to me: 'Mum, please don't give me away!' I comfort her by saying: 'I would never do anything against your wishes. Nothing has changed. I'm still your mother.'
"As for Anya, my biological daughter, she also says she wants to remain with the parents she knows. She will just visit from time to time."
Ms Belyaeva said she would never forget the moment she was re-introduced to Anya.
"As soon as I saw her, it was like looking at a copy of me as a child.
"At that moment I didn't need any DNA test result to tell me this was my daughter. In the two months since we haven't met very often. We live at different ends of town.
"When we have met up, she's called me 'Mum' a few times. But I think it's only because she thinks I'd like to hear that. Really, I'm a stranger to her.
"The other family are Muslim. So my biological daughter was brought up as a Muslim. They have completely different traditions and customs. That makes it even harder."