MILEY CYRUS beaten by Abdel Fattah el-Sisi to Time Person Of The Year poll Abdel Fattah el-Sisi won with 26.2% of vote after huge support from Egypt He was followed by Turkish PM Erdogan (20.8%) and Miley Cyrus (16.3%) But vote was marred by attempt to hijack by hackers who found loophole It allowed them to hand thousands of phantom votes to person of choice Also attempts to rig vote for Edward Snowden and Bashar al-Assad The Egyptian general who ousted former President Mohamed Morsi has been crowned Time's Person of the Year - pipping Miley Cyrus to the post. Abdel Fattah el-Sisi won the prestigious title with 26.2 per cent (449,596) of the popular vote after overtaking the Wrecking Ball singer thanks to a last-minute groundswell of support from his homeland. Behind him came Turkish Prime Minister Recep Tayyip Erdogan, who received 20.8 per cent of the vote (356,771), and Miss Cyrus, who received 16.3 per cent (279,300). But it was a closer call than many would have liked and came close to descending into farce as a variety of groups competed to rig the vote in favour of their chosen heroes. Close call: Abdel Fattah el-Sisi (left) won the prestigious title with 26.2 per cent (449,596) of the popular poll, overtaking Miley Cyrus (right) at the last minute. Huge support: General Sisi won the vote largely thanks to massive support from the Egyptian people who hail him as the man who ousted former President Mohamed Morsi Miss Cyrus enjoyed a surge in the poll that propelled her into first place last week and appeared to have set her on course for a historic win - all thanks to two programmers who made it their mission to help her twerk to the top. Known only as Gains and Marek, the pair worked out a loophole in Time's public voting process which allowed them to hand thousands of phantom votes to the person of their choice. After some deliberation, they chose Miss Cyrus, who repeatedly hit headlines this year for twerking on stage and writhing naked on a demolition ball in the music video of her single 'Wrecking Ball'. She was apparently unaware of their efforts and even took to Twitter in an attempt to garner more votes. Came close: Miley Cyrus repeatedly hit headlines this year for twerking on stage with Robin Thicke (left) and writhing naked on a demolition ball in the music video of her single 'Wrecking Ball' (right) 'Vote for me': Miss Cyrus was apparently unaware of their efforts and even took to Twitter in an attempt to garner more votes Loophole: The hackers worked out a loophole in Time's public voting process which allowed them to hand thousands of phantom votes to Miss Cyrus 'They realised that by plugging a person's Facebook ID number (which is public) into their scripts,' reported The Daily Dot, 'the duo discovered a sizeable loophole in (ballot host) Poptip's service: They could vote on behalf of that person without them knowing.' But it wasn't until Gains worked 'multiple threading' into his script that the pair were able to cast votes for Cyrus on an industrial scale. The Daily Dot went on: 'In the first version of his program, without threading, votes would only be cast one after another. Skewing the vote: The 4chan community tried to rig the vote in favour of NSA whistleblower Edward Snowden, who came fifth) while even The Syrian Electronic Army reportedly pushed for Bashar al-Assad (right) to win With multiple threads, ten votes could be cast at the same exact time. A thread could be described as a "worker." In other words, if there are ten threads, there are ten workers casting votes all at the same time. Others also tried to skew the popular vote. The 4chan community tried to rig it in favour of NSA whistleblower Edward Snowden, while even The Syrian Electronic Army reportedly pushed for Bashar al-Assad to be winner. But Time told Mashable last week that it was aware of efforts to rig the voting and that only valid votes would be counted. This was confirmed again by a magazine spokesperson Thursday. And if it hadn't been for massive support from Egyption voters, Miss Cyrus could well have held on to win. Time revealed this week that, in the end, Egypt 'accounted for the largest number of votes on the Time.com poll.' More than 1.3 million votes were submitted on TIME.com and nearly 560,000 others were registered via Twitter, for a total of 1,928,130 votes cast. The final decision will be made by Time's editors next week.