The last words of Heather Mosher's life were spent telling her husband how much she loved him on their wedding day.

The breast cancer that had metastasized throughout her body was no match for her pure joy when she finished her vows and raised her arms in celebration during an impromptu wedding ceremony with husband David Mosher.

Eighteen hours after she said "I do" on Dec. 22 at St. Francis Hospital in Hartford, Connecticut, she died at the age of 31. Her death on Dec. 23 came exactly one year after accepting David's romantic marriage proposal under a streetlight on a horse-and-carriage date.

Heather Mosher exulted during her wedding to her husband, David, only 18 hours before dying from cancer. Christina Lee Karas

"I saw her sick,'' Mosher told NBC Connecticut. "I saw her in a lot of pain and she didn’t give up until she married me. It is so humbling that someone could love me like that."

The heartbreaking scene was captured in photos by one of the bride's best friends, Christina Karas, who also served as a bridesmaid.

Heather and David Mosher got engaged exactly a year before she passed away. Christina Lee Karas

"It was a miracle,'' Karas told TODAY. "When she raised her arms, she was at death's door, but she was joyful and exuberant. She just wanted it to be a celebration."

The couple started dating in 2015 after meeting at a swing dancing class, leading to his bittersweet wedding proposal on Dec. 23, 2016.

On the same day they got engaged, doctors told Heather Mosher that a lump on her breast was cancerous. Five days later, she was given a diagnosis of triple-negative breast cancer, an aggressive and faster-growing cancer.

Heather Mosher summoned all the energy she had in her final hours to celebrate a joyful wedding. Christina Lee Karas

The couple had originally planned their wedding for Dec. 30, 2017, but the bride-to-be's condition necessitated speeding up the timetable.

"I was with her every single day at the hospital that week, and I wasn't in the mood to celebrate,'' Karas said. "She wanted me to be in a dress, and I just had to get into wedding mode because my heart was in 'losing my best friend' mode. I just thought, 'For Heather, I'm going to do this.'''

The couple learned that Heather had cancer on the same day they got engaged in 2016. Christina Lee Karas

Mosher was in such weakened state they initially considered draping the dress over her, but they were able to get it on her for the wedding in the hospital's chapel.

"She was gorgeous and she just felt like home to me," David Mosher told NBC Connecticut.

She was barely able to speak, but she labored for several minutes to make sure she delivered her entire wedding vows, which marked her final words.

"We were all in tears,'' Karas said. "We all knew this was all the time left we were going to have with her and we wanted to cherish every second."

Bridesmaid Christina Karas loved photographing Heather, whom she called an "amazing person." Christina Lee Karas

The couple's original wedding date of Dec. 30 ended up being the day of Heather Mosher's funeral at Plantsville Congregational Church, where they had planned on having the marriage ceremony. Her husband delivered a eulogy, and Karas also spoke about her friend.

"That was a really hard day,'' Karas said. "The world lost an amazing person."

The photos of the wedding have since touched people across the world online.

"This has been a heartbreaking time, but I'm glad this story has brought hope to so many people,'' Karas said. "This person was in her last moments and still feeling all this joy."

Follow TODAY.com writer Scott Stump on Twitter.