When Ted Bartling, a rocket scientist from Utah, decided to donate a kidney to a stranger, he knew he'd potentially be saving one person's life. What he didn't know was that he'd be saving three people's lives.

More on Yahoo: Facebook Helped Boost Organ Donation Registration

Bartling's incredible sacrifice, or as he calls it, gift, set in motion a of chain events at Salt Lake City's University Hospital and Primary Children's Medical Center that forever linked six people and allowed three, including a two year old boy, to receive successful kidney transplants late last week. On Thursday, Dr. Jeffrey Campsen, who performed surgery on the donors, told Yahoo Shine that all three recipients and their three donors are thriving and have headed home or will be discharged within the next couple of days.

Related: Kidney Donation Just Got Safer

"For it least 15 years, donating a kidney had been on my mind as something I could do to help somebody live a normal life like mine," Bartling, who is 51, told Yahoo Shine. "They'll only take a kidney up until we're about sixty. I can do small things for people, but sometimes we have to do the bigger things if we are capable. So I was like, yeah, go for it."

Turns out, he picked the perfect moment. There were three patients in need, but no matches. Juan Romero, 45, who is a rare B- blood type had been on a waiting list for three years and was on dialysis. Brandy Jess, 40, also on dialysis, had a donor-her friend Kristy Buffington-but at the 11th hour, a final test revealed they were incompatible. And then there was two-year-old Beckham Fershtut, whose parents Ari and Hayley wanted to give him a kidney but weren't good matches.

"The chain began with the child," said Campsen. "He was weeks away from starting dialysis. For a two-year-old it's incredibly difficult and shortens his life span." Campsen says he could see that Beckham's kidneys were failing. The toddler was listless and irritable and his skin looked ashy. "And then we had a gentleman come forward who wanted to be what we call an altruistic donor."

Story continues

The boy's father, Ari Fershtut, has also made clear that he was willing to donate a kidney to a stranger if someone else had an organ for his son. Suddenly the pieces fell into place. "We moved quickly and there was an 'aha moment' when we came to the table with all this information," said Campsen. Ari Fershtut was a match for Juan Romero, Ted Bartling was a match for Brandy Jess, and Kristy Buffington was able to donate her kidney to little Beckham.

The surgeries were completed over two days. Bartling says that while the hospital didn't formally introduce the donors and recipients, they sought each other out in the hallways after their surgeries. "The very first person that I met was the father of the child. It was very touching to meet the little boy. It's major surgery, there is not much room for an adult kidney in a child that young. You could tell he was very comforted by having anyone by his crib." According to Campsen, Beckham is now full of energy and his prognosis is excellent. "His parents look like they have had a 100-pound weight lifted from them."

Campsen stresses the importance of live kidney donations, which he says are safe, effective, and get recipients off of dialysis sooner and lengthen their lives. Currently there are about 90,000 people on the waiting list for transplants. "Kidney transplantation is medicine," said Campsen, "but this was about a community coming together and helping each other." He says it was like a ripple effect across Salt Lake City, the state of Utah, and "perhaps even the nation itself." Because of Bartling's courage and generosity, Beckham only had to wait a month for a kidney. "If it had been years," said Campsen,"he might not have survived."

Also on Shine:

Breast Cancer Survivor Receives Adorable On-Camera Marriage Proposal

America's Top 10 Cities Where People Stress Less

Denver Hero Saves Mom and Daughter From Flash Flood