A babysitter donated a part of her liver to save the life of a baby girl she had known for just three weeks.

Kiersten Miles first met the Rosko family last June after a mutual friend recommended her to look after their 16-month-old daughter Talia.

They told her the baby was suffering with Bilary Atresia - a life threatening condition which causes the liver's ducts to become backed up with bile, destroying cells and the liver itself.

As a result the little girl required a liver transplant and the 22-year-old college student immediately volunteered to see if her organ matched.

“It's such a small sacrifice when you compare it to saving a life," the college student from New Jersey told the US broadcaster WTXF. "Some of her doctors said she possibly wouldn’t have made it past two-years-old."

She added: "All I had to do was be in the hospital for a week and a 5-inch scar. I don’t know, it just seemed like such a small sacrifice to me."

Kiersten Miles pictured with baby Talia before their operations (Facebook)

After discovering she was a match, Ms Miles immediately volunteered to donate a part of her liver, undergoing a major surgery that would last for five hours.

But Talia's parents, George and Farra initially questioned her decision.

Ms Rosko said: "I'm like: 'Kiersten, this is a serious surgery. You have to talk to your parents. It's not like donating blood."

Ms Miles told her that she had already discussed the donation with her mother and they had agreed it was the right thing, she added.

After six-months of tests, Ms Miles was operated on at the Hospital of the University of Pennsylvania.

Part of her liver was removed and then transported to Talia who was operated on at the Children's Hospital of Philadelphia.

Both operations were successful and both Talia and Ms Miles are said to be recovering well.

She will never be able to donate again, even if she decides to have children of her own in the future and they require a similar organ donation.

“I can never donate again, so they had to tell me in the future so if I have a child in a similar situation or a different one and they need a liver even if I’m a 100 per cent match I can’t donate. You can only donate once,"she told Fox News.

She added that she had no regrets about her decision.