A Connecticut bride lost her battle with breast cancer just 18 hours after exchanging wedding vows with her husband.

The former Heather Lindsay and David Mosher said, "I do" Dec. 22 in the chapel of St. Francis Hospital and Medical Center in Hartford. The former Heather Lindsay was dressed in her wedding gown and lying on her hospital bed.

The 31-year-old bride died the next day.

"Some of her last words were her vows," David Mosher told ABC News.

I am in awe of the strength Dave's love inspired in Heather even in her last hours. She was his great love and he was hers. I pray these moments give Dave the same strength now to carry on the legacy of their love. Heather, you are greatly missed. The earth froze yesterday as the warmth of your light ascended to be with God for eternity. Until we meet again my dear friend. Watch over us. Original post from 12/24/17.

A post shared by Christina (@christina.lee.photography) on

The couple fell in love after meeting at a swing-dancing class in 2015.

The Broad Brook, Conn., resident was diagnosed with an aggressive type of breast cancer in December 2016. That night, David Mosher of North Haven, Conn., proposed to her as they rode in a horse-drawn carriage.

"Now more than ever, I needed for her to know that she's not going to do this alone," said David Mosher, 35.

The two planned their wedding for Dec. 30 while the bride-to-be underwent two surgeries and several rounds of chemotherapy.

However, a doctor told them to marry "sooner than later," David Mosher told ABC News.

A post shared by Christina (@christina.lee.photography) on

The couple exchanged vows in front of loved ones inside the hospital eight days early.

Heather Mosher wore a wedding dress, wig and jewelry while she lay in bed with an oxygen mask. She was on life support.

"She was dying, and it was clear while we were all there that these were the last moments of her life," one of the bridesmaids, Christina Karas told ABC News.

The bride's family had her funeral Saturday, the day the couple initially planned their wedding.

"She held on to stay alive for the wedding, a wedding to the man of her dreams," Karas said.

Contributing: The Associated Press.