Scientists have proved for the first time that sperm grown from embryonic stem cells can be used to produce offspring.
The discovery in mice could ultimately help couples affected by male fertility problems to conceive.
And by understanding embryo developmental processes better, a host of other diseases might be treated using stem cells, they say.
The study is published in the journal Developmental Cell.
The experiment was carried out using mice and produced seven babies, six of which lived to adulthood.
However, the mice showed abnormal patterns of growth, and other problems, such as difficulty breathing.
As well as the safety concerns, using stem cells to create sperm also raises ethical questions.
Stem cells are special because they have the potential to develop into any tissue in the body.
Professor Karim Nayernia and colleagues at the Georg-August University in Göttingen, Germany, took stem cells from a mouse embryo that was only a few days old and grew these cells in the laboratory.
Using a specialised sorting instrument they were able to isolate some stem cells that had begun to develop as sperm.
They encouraged these early-stage sperm cells, known as spermatogonial stem cells, to grow into adult sperm cells and then injected some of these into female mouse eggs.
The fertilised eggs grew and were successfully transplanted into female mice and produced seven babies.
Professor Nayernia, who now works at Newcastle University in the UK, said: "For the first time we have created life using artificial sperm. This will help us to understand how men produce sperm and why some men are unable to do this.
"If we understand this we can treat infertility in men."
In the future, men with fertility problems might be able to have their own stem cells harvested using a simple testicular biopsy, matured in the lab and then transplanted back.
It is estimated that one in seven UK couples have difficulty conceiving - about 3.5 million people. In about a third of all couples having IVF, male fertility is a contributory factor.
About 1% of all men don't produce sperm and a further 3-4% of men have a low sperm count that could lead to infertility.
Dr Allan Pacey, senior lecturer in andrology at the University of Sheffield and honorary secretary of the British Fertility Society, said: "To be able to make functional sperm under controlled conditions in the laboratory will be very useful to study the basic biology of sperm production.
"There are currently many things we don't know about how sperm are formed let alone why it sometimes goes wrong and leads to infertility in some men.
But he added: "It is more difficult to say whether artificial sperm produced this way could ultimately be used as a new treatment for male infertility. There are many technical, ethical and safety issues to be confronted before this could even be considered."
Ethical and safety issues
Professor Harry Moore, professor of reproductive biology at the University of Sheffield, said: "These processes in the test-tube are far from perfect as the mice that were born by this process were abnormal.
"We therefore have to be very cautious about using such techniques in therapies to treat men or women who are infertile due to a lack of germ stem cells until all safety aspects are resolved. This may take many years."
Anna Smajdor, a researcher in medical ethics at Imperial College London, said: "The creation of viable sperm outside the body is a hugely significant breakthrough and offers great potential for stem cell research and fertility treatments.
"However, sperm and eggs play a unique role in our understanding of kinship and parenthood, and being able to create these cells in the laboratory will pose a serious conceptual challenge for our society."
Josephine Quintavalle, of Comment on Reproductive Ethics, agreed.
She said the use of adult stem cells from sources such as umbilical cord blood had consistently produced more promising results than the use of embryonic stem cells.
Professor John Burn, professor of clinical genetics at Newcastle University, believes stem cells will be a treatment for all types of diseases.
"The same approach could ultimately allow us to control the development of liver cells, heart cells or brain cells...and make treatments for virtually any tissue that is damaged or diseased."