Dunedin resident Sam Jamieson was set to marry Janet Harraway at the Registry Office on Friday, have photos taken in the Botanic Garden, before a dinner with friends and family at a Dunedin restaurant.
But on Monday, his 35-weeks pregnant fiancee was admitted to Dunedin Hospital with pre-eclampsia, a disorder during pregnancy in which a rapid rise in blood pressure can cause seizure, stroke, organ failure and death of the mother and baby.
After a terrible few days, he and the couple's son Rowan Jamieson (4) were pleasantly surprised by an announcement from a nurse on Thursday.
"They said 'You're having a baby today' and I was like 'What?'."
A few hours later, Will Jamieson was born five weeks early.
Family and friends had flights from Christchurch, Wellington and Brisbane booked, so the couple decided to get married in the hospital chapel on Saturday.
Mr Jamieson said everything had worked out well and although Will was in intensive care, he and his wife would be fine.
"The hospital staff have been amazing and so accommodating to make this happen."
Hospital chaplin Wendy Knauf said there had been about 90 weddings in the hospital since the chapel was built but most ceremonies were in wards because the bride or groom were too sick to move.