A bride-to-be getting her hair done down the block from the Friday morning crane collapse was escorted through the chaos by an FDNY chaplain, who then married ​the woman and her groom ​on the spot.

The impromptu wedding took place on the steps of the ​nearby ​Tweed Courthouse​ — the Department of Education headquarters — where Nesh Pillay, 25, and Aaron Vanderhoff, 27, had originally planned to take their ​wedding ​photos before tying the knot at City Hall at 10 a.m.

“It was really supposed to be a very simple ceremony with our immediate family,” said Pillay, who chose to keep her ​sur​name. “My mom and sister and I went to get our hair blowed out at Drybar when my sister felt what she thought was an earthquake. Within a few minutes, the whole place cleared out.”​

After being informed of a possible gas leak, Pillay threw on her wedding dress for the first time since trying it on last month and went outside to assess the scene. She tried to call an Uber to the salon, which is around the corner from the crane collapse at 180 West Broadway, ​not realizing that was impossible at that point.

“Nesh had ​to ​text my stepmom saying, ‘There’s a crane that collapsed, I don’t know if the photographer is going to be (at Tweed court) in time. People are injured, I can’t believe this,'” recalled Vanderhoff.

​But fate intervened. ​As Pillay tried to snake her way under police tape and through the pandemonium, she was greeted by New York City Fire Department Chaplain Ann Kansfield.

“She ran up and put her jacket around me,” the Toronto native said. “I explained to her my situation and she told me everything was going to be all right.”

Kansfield — who is the FDNY’s first female and openly lesbian chaplain — escorted Pillay all the way to Tweed Courthouse. She even went back to the salon to retrieve a bag with some personal items that her sister had left.

“As she was looking for my suitcase she sent me a text that said, ‘Don’t be worried, all brides are late, only you have an excuse,'” Pillay said.

The chaplain added in the text, “Don’t worry, we will get you married today in a lovely ceremony.”

Once they met back up, Kansfield did her best to console the shaken-up bride.

“I was freaking out and my feet hurt and I was cold,” Pillay recalled. “While we were walking she sort of held my arms and assured me that everything would be OK and that she would marry us if needed.”

When they arrived at the courthouse, that’s exactly what happened.

“She married us right on the steps of the courthouse, of all places,” Pillay said, noting that she and her husband were also heartbroken to hear that someone had died in the collapse.

“I wanted to be excited about getting married, but it was hard because there were other families feeling grief today,” she explained. “But I was very grateful to have Chaplain Ann. She was like my invisible wedding planner that we didn’t invite, but showed up anyway. She went above and beyond marrying us, and I think she will be such an important part of our lives from here on out.”

Vanderhoff said that without Kansfield, they would not have been able to stay optimistic on their special day.

“The whole thing is extremely tragic. I can’t even begin to express my sympathies for the people who are injured and involved,” he said of the crane collapse. “But what the chaplain did for us is super special. I feel like she saw a situation where she felt she could help out and she kind of just stepped right in and kind of really blew us away with her generosity of just taking hold of the situation and coming over and doing the ceremony. I feel blessed that she was there at that very moment.”

Watch the crane’s terrifying fall in this video: