It was expected to take four to six hours. But after Maddie was taken out of theatre, she was later rushed back in.
Her new kidney was not working and had no blood flow to it due to a kink in an artery.
Surgeons reopened her wound and unsuccessfully tried to restitch the artery to remove the kink. They then tried to shorten the artery, but that did not work either.
Maddie's new kidney was then removed and surgeons re-positioned it in a higher position.
Her second surgery lasted for more than seven hours.
Her mother Sarah Manson-Collins told The Star that Maddie's new kidney had started to produce urine.
The teenager was now in the Intensive Care Unit. Manson-Collins said Maddie was going to have a couple of hours of hemodialysis as her potassium levels were high, which affected her heart.
"It's a waiting game for us over the next 24 hours."
The family will know within days if the transplant has been successful.
Manson-Collins told The Star it can take up to a month for a transplanted kidney to start working.
"The concern with Maddie is she is at a high risk of her disease rearing up again and shutting the new kidney down. We will know within days if this is the case," she said.
Maddie will now spend about three months at Starship recovering.
"This is surreal. Is it going to work? Wow, what a miracle," Manson-Collins said the day before the surgery.
She said said Maddie cried on Tuesday night when she was told of the kidney.
"She knows it's going to be rough but she also knows this is the best thing for her," Manson-Collins said.
Maddie suffers from kidney disease, nephrotic syndrome, of which there was only about a two per cent chance of finding a match in New Zealand.
She received a kidney transplant from her father Adam Collins five years ago but her body rejected it. Manson-Collins is hopeful it will be different this time.
"The team up here wouldn't have offered it to Maddie if they didn't think it was the right thing to do," she said.
Manson-Collins said it is likely Maddie's disease will return following the kidney transplant.
"Starship knows what to do to control it, it just makes it a lot harder on Maddie," she said.
The family did not expect to be able to find a kidney match in New Zealand.
They were planning a trip to The John Hopkins Hospital in Baltimore, United States, which had been looking at new kinds of transplants, to find a match.
They have spent years fundraising to try and get Maddie to the US, which included the auction of a drawing by former Prime Minister Bill English.
Since her diagnosis, Maddie has undergone more than 50 operations, been on life support twice, had both kidneys removed, one failed transplant and undergoes dialysis every night.
Manson-Collins said they feel for the family who lost their loved one, but they were also really grateful for the donation.
"There's a family grieving and we'd just love them to know that this kidney is going into a really special child that's going to make a difference in this world," she said.