Only half an hour into the Progressive Conservative Party's schedule for its leadership announcement on Saturday afternoon, it was clear something had gone wrong.
Up to that point, the Ontario party was finally ready to turn the page on one of the most chaotic periods in its history. Just 44 days earlier, they had lost a leader to scandal and now, after mudslinging between four candidates for a month, hundreds of the PCs supporters had gathered in a Markham hotel convention centre and were ready to put it all behind them.
The party's interim leader had taken the stage and called for unity after a difficult leadership contest that had exposed deep ideological divisions. On the ballroom floor, members held campaign signs high and cheered their candidate's name when they appeared on the giant screens. Above them, balloons were hanging and ready to fall on the new leader of Ontario's Official Opposition. Little did the gathered crowd know that the long-awaited victory party would not be coming, the new leader would not be showered in adoration and the balloons would not come tumbling down.
Read more: Doug Ford formally takes reins of Ontario PCs as Christine Elliott concedes
Lori Turnbull: Will the Ontario PCs be able to literally keep it together?
The event had just taken a break in its program before the ballots were to be read out and the new leader announced. However, in a room at the Hilton hotel, lawyers were gathering.
Volunteers and scrutineers working with the four campaigns had noticed something that had been flagged earlier with the party's ballots. About 3,000 of the votes cast in the online process weren't assigned to any specific riding.
The voting system, which the party had adopted out of necessity due to the rushed leadership vote, came under intense criticism during the campaign for its complexity and the trouble many party members were having signing up. Under party rules, each of the province's 124 ridings is given 100 points. Candidates receive a percentage of those points based on the number of votes they get.
At 11:30 on the morning of the convention, an e-mail had gone to some of the party's leadership from a lawyer for one of the campaigns asking about the 3,000 ballots and how they were being allocated. It was the first sign of trouble.
"The votes were cast and now scrutineers were coming forward and saying there was a problem with the voter lists," a senior party official told The Globe and Mail.
Just after 2 p.m., as the cheers were getting louder in the ballroom, lawyers from each of the campaigns gathered to talk about the unallocated ballots – known in party jargon as 999 ballots, because of the code given to them in the party's computer system.
While most ballots were given a code between 1 and 124, corresponding with the provincial riding the member lived in, 999s were special ballots. Some of the people assigned the code were big donors, which the party wanted to keep separate on its computer system, others lived on rural roads, in postal codes near riding boundaries or had given the party a PO box as an address.
The use of 999s had been flagged as a problem by the campaigns earlier in the race, but the party had promised to allocate each to the right riding and in the whirlwind of the contest people moved on.
Now what seemed like an insignificant problem was about to derail the day. The lawyers knew something that the people in the convention hall didn't, the race was close. Only a few hundred ballots could swing the contest either way between Doug Ford and Christine Elliott.
A complaint was made by Ms. Elliott's camp, according to party officials. They were concerned the ballots weren't being allocated correctly. As the crowd began to head to the bar set up outside the ballroom, the lawyers and party officials began to debate the 3,000 ballots. Soon, they narrowed their concern to 1,300 ballots, then 240. By the end of the evening, only 94 votes were still in question, which represented fewer than six points in the race.
Each campaign came to the hotel armed with their internal tracking data and, based on that, Ms. Elliott was the front-runner. But once the 64,063 ballots were actually counted, the insider said, the numbers told a different story. On the third and final ballot, Ms. Elliott had won 53 per cent of the popular vote and the most votes in a majority of ridings. Mr. Ford, however, had received a higher score based on the party's system that gave candidates points for each riding.
In the end, Mr. Ford had 6,202 points while Ms. Elliott captured 6,049 points. Despite losing the popular vote and coming second in more ridings, Mr. Ford had squeezed out a 153-point victory.
Most of the party's senior officials didn't know what was happening inside the room where lawyers, scrutineers and members of the party's appeals board were meeting –about 30 people in all.
As they looked at the ballots, everyone was congratulating Ms. Elliott's team and assuming she would emerge as the winner, said a party official who was in the room.
Outside, officials began to draft a plan to deal with the evening. They were concerned that Ms. Elliott was winning and the long delay, without explanation, would be seen as an elite takeover of the party.
"We thought Doug was losing and might challenge this, we wanted to satisfy him that this was right," said a senior party source.
Outside, time was ticking by. The party was way behind schedule. Members began looking at their watches. "We always thought we were five minutes away from an actual answer on who the leader would be, we always thought we had a handle on the problem, but then it kept getting bigger," the official said, explaining the lack of communication with members.
At around 7 p.m., several hours after a leader should have been announced, Hartley Lefton, the chair of the party committee running the process, took the stage and, facing an unhappy room, asked people to leave.
Behind the stage, party officials say they needed to figure out the facts. After hours of hearings, meetings and simulations, they were confident Mr. Ford had won. Just after 10 p.m., he stepped forward as the leader of Ontario's Tories.
Adam Radwanski, political columnist, explains the surprising and major shift that led Doug Ford to win the leadership to campaign for Premier of Ontario
The Globe and Mail