Final results were due at midday but the state-run Rupavahini television had already declared President Mahinda Rajapaksa , bidding for a second six-year term , the winner by a margin of more than 1.8m votes .