Researchers at Massachusetts General Hospital in Boston have made functioning rat kidneys in the laboratory, a bioengineering achievement that may one day lead to the ability to create replacement organs for people with kidney disease.

The scientists said the rat kidneys produced urine in the laboratory as well as when transplanted into rats. The kidneys were made by stripping donor kidneys of their cells and putting new cells that regenerate tissue into them. Stripping an organ leaves a natural scaffold of collagen and other compounds, called the extracellular matrix, which provides a framework for new cells and preserves the intricate internal architecture of the kidney as well as its basic shape.

Dr. Harald C. Ott, senior author of a paper describing the research that was published online Sunday by the journal Nature Medicine, said that the work was still in its early stages and that there were many hurdles to creating fully functional kidneys for people. But he noted that replacement organs made in this way would have advantages over those made with artificial scaffolds or other techniques.

“The huge benefit would be that it’s fully implantable in the shape of a kidney,” he said.

About 17,000 people with end-stage kidney disease receive a donor organ each year in the United States, but more than five times as many patients are on waiting lists. In 2011, nearly 5,000 people died while awaiting transplants. Bioengineered kidneys, especially if made using nonhuman sources, could ease or eliminate this organ shortage.