When she read the article in the Cape Cod Times about the 11-year-old girl who underwent a life-saving liver transplant, Melissa Dunphe knew.

“Too many pieces fit for it not to be.”

She knew that the child, who was at the same hospital on the same floor on the same day, had to be the one who received her five-year-old daughter Kaitlyn’s liver.

Five years earlier, at eight months old, Kaitlyn was in a car accident that left her without the use of her limbs and unable to breathe on her own.

During her short life, her parents made moments matter.

“She was a very happy child,” her mom Melissa says. “She loved life — going for walks, having her nails painted and going to the beach. “We knew she wouldn’t live long, but I never expected it to be so soon.”

Two lives inexplicably intertwined

In the early hours of Jan. 29, 2013, alarms were sounding in the Dunphe home in Orange, Massachusetts. Kaitlyn was unresponsive. She was rushed to a local hospital and then transported to Boston Children’s Hospital.

Meanwhile, more than 100 miles away on Cape Cod, Hannah Swift was vomiting and suffering severe headaches and extreme disorientation. The fifth-grader, who’d always been healthy, was in acute liver failure. The next morning, a special team brought her to Boston Children’s, where within hours her family was told she would need a liver transplant to survive.

“That was the day we learned Kaitlyn’s brain had stopped functioning,” says Melissa. “It was also the day we made the decision to donate her organs. Later, we were told Kaitlyn’s liver went to an 11-year-old girl.”

Hannah and her mom, Carolyn

Forging a friendship

Today, Hannah is a ninth grader at Barnstable High School. Although she’s still coping with some health challenges, the liver that saved her life via an ABO incompatible transplant is still functioning well. She doesn’t remember much about the days surrounding the surgery four years ago, but her mom Carolyn will never forget. Nor will she forget that while another child was dying, Hannah needed an organ to live.

FIRST-TIME MEETING: Melissa and Hannah

“I felt guilty at first,” Carolyn says. “The Dunphes just lost their daughter, and our daughter was saved.”

But even before their first face-to-face meeting, there was a palpable connection, “It was as if we already knew them,” Melissa says.

At a halfway point between their homes, Carolyn and Melissa arranged to meet for the first time.

“We felt comfortable right away,” recalls Carolyn. “It wasn’t at all awkward, since our girls are close in age. They just hung out and had fun.”

Since their initial meeting, the Swifts and the Dunphes have continued to stay in touch, including sleepovers, visiting a butterfly garden — Kaitlyn loved butterflies — and each March, celebrating Kaitlyn’s birthday together by the graveside.

Both moms agree, “We are family.”

Hannah visits Kaitlyn’s grave with Kyla and Jenna Dunphe.

Melissa can’t shake the thought that the stars aligned that January, that somehow Kaitlyn was meant to be there for Hannah. A photo taken in June 2013 at the Eversource Walk for Boston Children’s highlights the uncanny connection. It was the first year the Dunphes participated in the walk without Kaitlyn.

“Hannah’s name is right behind Kaitlyn’s,” Melissa says. “What are the odds? Out of all the flags that line the path, they just happened to be close together.”