The Department of Elections said results from 11 of the country's 160 polling divisions plus a large number of postal votes gave Mithripala Sirisena a lead of 56.5 per cent against 42 per cent for Rajapaksa, who is seeking a third term as President.
"We don't have any good news. It is all bad news," said a senior government official and close ally of Rajapaksa, declining to be named. "I think people need a change and this is democracy."
Sirisena, a former government minister who deserted the President and changed sides to become the opposition's candidate in November, has vowed to root out corruption and bring constitutional reforms to weaken the power of the Presidency.
Rajapaksa won handsomely in the last election in 2010, surfing a wave of popularity that sprang from the defeat in the previous year of ethnic Tamil separatists who had waged a crippling war against the state for decades.
But critics say he has become increasingly authoritarian since becoming President, with several members of his family holding key positions of power.
The early results showed Rajapaksa remained popular among the country's Sinhala Buddhists, who account for around 70 per cent of the population, but his challenger had taken a strong lead from the ethnic Tamil-dominated former war zone in the north of the country and Muslims-dominated areas.
Despite his waning popularity, Rajapaksa called the latest election early, confident that the perennially fractured opposition would fail to find a credible challenger. He did not anticipate the emergence of Sirisena, who dined with the President one night and turned on him the next day.
Election officials said the turnout from an electorate of about 15 million was provisionally 65-80 per cent. A clear winner may not emerge until later today.