A dying judge who had vowed to officiate his daughter's wedding was able to keep his lifelong promise — from his hospital bed.

Twenty-seven-year-old Casey Kapalko and her partner, Stephanie, were married April 15 by Casey's father, Monmouth Superior Court Judge Paul Kapalko, in the intensive care unit of a New Jersey hospital.

The Asbury Park Press reports he was diagnosed with a rare cancer in 2011 and was originally given four or five years to live. During his treatment, he was visited frequently by Casey and his other daughter, 23-year-old Christina.

Paul Kapalko initially volunteered to marry Casey and her partner after she announced her engagement in 2016.

Casey and Stephanie originally planned their wedding for November but moved it up to May after Paul was moved to the ICU. On April 15, Casey asked her partner if she wanted to get married that day by her father.

The hospital room ceremony was held with close family and friends wearing masks and gloves since Paul's immune system had become weak from his illness. Christina served as the maid of honor.