Katie Coelho awoke to a phone call from a panicked Danbury Hospital nurse around 3 a.m. Wednesday.

Something “terrible” had gone wrong with her husband’s condition as he battled COVID-19, the nurse told her, and she needed to hurry to the hospital to say goodbye.

By the time Coelho arrived from her home in Bethel, it was too late.

Moments earlier, Jonathan Coelho died of cardiac arrest, a complication following a nearly monthlong battle with the coronavirus. He was 32.

With tears in her eyes, a stunned Katie Coelho sat beside her husband’s body and spoke to him one last time. She then took a bag of her husband’s belongings and left the hospital.

Later that day, when she opened his cellphone hoping to find photos of him and their two children, she found it — a small salve for the pain she felt inside.

“I love you guys with all my heart and you’ve given me the best life I could have ever asked for,” read a message that popped up the second she unlocked the phone.

“I am so lucky it makes me so proud to be your husband and the father to Braedyn and Penny,” it read. “Katie you are the most beautiful caring nurturing person I’ve ever met ... you are truly one of a kind … make sure you live life with happiness and that same passion that made me fall in love with you. Seeing you be the best mom to the kids is the greatest thing I’ve ever experienced.”

Jonathan Coelho wrote the message to his family only a few days into his three-week stay at Danbury Hospital.

In addition to loving messages to his wife and each of their two children, the note included information about the couple’s home mortgage, contact information for his insurance provider and more.

“He was a planner,” Katie Coelho said Friday in an interview with Hearst Connecticut Media. “He was sitting there in the hospital, fighting for his own life, and what he was thinking about was us and what we would need if things didn’t work out. That’s just the kind of caring person he was.”

The unexpected message brought back painful memories and thoughts of the days before her husband had been diagnosed with the coronavirus.

It was mid-March and the coronavirus was starting to grip the state when Jonathan Coelho told his wife he was scared to go to work as a probation officer at the Stamford courthouse.

He was afraid of contracting the virus and possibly spreading it to their children, 10-month-old Penelope and Braedyn, a 2-year-old at high-risk because of neurological disorders, including cerebral palsy.

“He loved his job and his co-workers, but he was scared,” Katie Coelho said. “He said how his biggest fear was getting sick and not being there for me and the kids, or something happening to us and missing out because of it.”

Despite the apprehensions, Jonathan Coelho continued going to work.

Around this time, Coelho unknowingly had direct contact with a co-worker with the coronavirus, his wife said.

By March 22, Coelho started experiencing symptoms consistent with the virus — ocular migraines, loss of smell, upset stomach.

Four days later, Coelho — pale and weakened by the sickness, holding back tears — said goodbye to his children and left for Danbury Hospital.

It was the last time Coelho saw his children in person.

Both children later tested positive for the virus, though aside from a small fever, they were largely asymptomatic. Doctors told Katie Coelho that she could safely assume she had the virus as well.

“This was his biggest fear right before this all happened,” Katie Coelho said, her voice quivering. “And his biggest fear came true: He died alone.”

At first, doctors were optimistic about Coelho’s recovery. He was young and had no preexisting conditions, though he had survived two bouts of cancer as a youth, his wife said.

But by March 31, he was intubated and moved to an intensive care unit. Two weeks later, he was dealing with an unknown infection and kidney failure.

Then, on Tuesday, the family received some good news.

Doctors said he had been off the ventilator for almost the full day.

“The nurse said that he was almost there, he was only a few days away (from a recovery),” Katie Coelho said.

But his condition took a sudden turn for the worse that night, and by the next morning, he was dead.

According to the state medical examiner, Coelho died of “complications due to COVID-19 infection.”

Coelho is one of at least four state employees who have died as a result of COVID-19, and one of eight employees with confirmed coronavirus cases at the Stamford courthouse.

Coelho worked for the state’s judicial system since 2010, when he started as a judicial marshal in Danbury. From there, he rose through the ranks, holding jobs as an intake, assessment and referral specialist, a bond commissioner and, finally, an adult probation officer.

Gary Roberge, who oversees all state probation officers, called Coelho’s death a “heartbreaking loss for the whole Stamford courthouse community.”

“When I think of Jonathan, I think of his smile. Every time I saw him, whether it was in the field or at a training event, he was always happy and upbeat,” Roberge said.

The Coelhos met while attending Western Connecticut State University in Danbury. After many years as friends, the two started dating and were married in 2013.

Katie Coelho, 33, said her husband was a diehard Patriots fan. Each Sunday, the family donned matching Patriots jerseys and watched the games together. The two were also huge fans of the NBC sitcom, “The Office.”

“I know most married people say things like, ‘He was my best friend,’ but he was truly my best friend,” Coelho said.

After the birth of their son, Braedyn, two-and-a-half years ago, Katie Coelho stopped working to take care of him full-time.

“I stayed home and took care of the kids and he was our provider. Now, I don’t know what the next step is,” she said.

With the loss of her husband, family members have set up a GoFundMe page to help raise money toward the family’s expenses, which includes therapy sessions for Braedyn five times a week.