If ever a picture captured pure happiness and relief, this is it.

That’s Andrew Hanson on the left giving a bear hug to Dr. Bryan Hodges moments after he delivered Hanson’s son. They’d both been there before, with a much more tragic outcome.

Andrew Hanson, left, hugs Dr. Bryan Hodges after he delivered his son Karson at St. Luke's Hospital in Boise, Idaho. Hanson's first baby died soon after birth less than a year earlier. TODAY

This time, they were crying tears of joy as baby Karson loudly announced his arrival into the world at St. Luke’s Hospital in Boise, Idaho, in February. The men’s emotional embrace was captured in a photothat’s since gone viral.

“That was the most beautiful thing I’d ever heard,” Hanson told TODAY Parents about the instant he heard his son cry. “When he came out, it was like he knew that we needed to hear him… Dr. Hodges was crying and happy and I just reached over and gave him a big old hug.”

Karson was born perfectly healthy on Feb. 21. It was a different story less than a year earlier, when Hanson’s wife Amanda arrived at the hospital to give birth to the couple’s first child.

The baby was long-awaited, with Andrew and Amanda, both 34, struggling with fertility issues for two and a half years before conceiving.

The pregnancy was routine, but when the baby boy, named Klayton, was born on April 6, 2013, he had aspirated meconium and wasn’t breathing.

What Andrew remembers most is that the baby didn’t cry and the room suddenly filled with doctors. He felt helpless as they started working on the newborn, he recalled.

Never miss a parenting story with TODAY newsletters: Sign up here

Trending stories,celebrity news and all the best of TODAY. This site is protected by recaptcha

By the time Klayton was resuscitated, he had gone too long without oxygen, suffered hypoxic ischemic encephalopathy and was considered brain dead, Amanda said. He lived for six days. Amanda and Andrew donated his organs, and said his kidneys went to a mother of two.

“We tried to fit a world of love into that little short time,” Amanda said, her voice breaking. “We just got as much time as we could.”

Amanda and Andrew Hanson share a moment with baby Klayton, who lived for six days in April 2013. TODAY

It was the first patient Dr. Hodges had lost since he started delivering babies in 2002, a death he found incredibly traumatic, he said. The delivery is always on his mind.

But a few months later, Andrew and Amanda were back in his office. To the couple’s shock, Amanda was expecting again — news that was both exciting and scary.

“I couldn’t believe it. We were still both mourning, we hadn’t really moved past (Klayton’s death),” Andrew said.

RELATED: Mom's viral 'rainbow babies' photo shows the hope after pregnancy loss

Just 10 months after enduring the death of their firstborn, they were back at St. Luke’s Hospital, where Dr. Hodges was once again ready to deliver their son. Andrew had an eerie feeling like they had never left.

“Right up to the moment he came out, I was scared that something bad was going to happen,” Amanda recalled.

The labor went much quicker this time around, with Amanda feeling Klayton’s presence in the delivery room as she gave birth to his brother Karson.

After so much heartache for the couple, there was joy on Feb. 21 as their son Karson was born. He was healthy and had a good strong cry. TODAY

“When Andy cut the cord, (the baby) let out… just this battle cry of, ‘I’m here,’” Dr. Hodges, 50, recalled. “Andrew looked up at me and he had tears streaming down his eyes… and he walked around and gave me a big hug. It was a good closure."

That’s when maternity photographer Sarah Ledford of ShutterHappy Photography snapped the embrace.

“I was crying and the doctor was crying and the nurses — it was amazing,” Ledford said. “Everything bad that had happened had just been lifted off of every single person involved.”

The moment took her breath away, she wrote on her Facebook page, where she posted the photo. It has since been shared more than 15,000 times and received more than a quarter million “likes.”

“I was just so happy. So, so happy. Relieved,” Andrew said. “I knew that moment was going to come and I was going to break down and bawl.”

Amanda and Andrew Hanson hold their son Karson, who is now 4 months old. TODAY

Four months later, Karson is a “smiley and happy” healthy little boy, his parents said. His middle name is Klayton, in honor of his late brother.

“Some days, it’s still a roller coaster,” Amanda said. “Looking at Karson, I try to imagine where Klayton would be at this point and some days it just hits me like a ton of bricks that he’s not here. I just wish he was.”

RELATED: Mom stages special photo to send a healing message about miscarriage

Follow A. Pawlowski on Google+ and Twitter.