Abdullah Abdullah has vowed to reject the result of the election, claiming he is the victim of 'industrial-scale' fraud. Photograph: Rahmat Gul/AP

The Afghan government has rejected a proposal to ban Facebook during an ongoing deadlock over the presidential election, despite fears that social media postings have fanned ethnic hatred.

The dispute between candidates Ashraf Ghani and Abdullah Abdullah over alleged fraud in the 14 June election has triggered bitter online exchanges between rival supporters that have threatened to spill over into violence.

Ghani attracts much of his support from the Pashtun tribes of the south and east, while Abdullah's loyalists are Tajiks and other northern Afghan groups – echoing the ethnic divisions of the bloody 1992-96 civil war.

"The national security council discussed banning of Facebook in their meeting today," Fayeq Wahedi, the deputy presidential spokesman, told AFP on Sunday.

"There are people on Facebook who spread hatred and cause damage to national unity, but after talks the council decided not to ban Facebook."

Internet use has soared in Afghanistan in recent years, and supporters of both sides have been posting hostile messages and photographs since the fraud allegations erupted.

Two weeks ago, the United Nations issued a warning that the internet activity could spark civil unrest.

"There has been a disturbing tone in some social media platforms, and we urge supporters … to refrain from inflammatory statements, hate speech or statements which promote divisive ethnic mobilisation," the UN mission chief, Jan Kubis, said.

He added that some postings were "rhetoric that brings back memories of tragic, fratricidal, factional conflicts in the 1990s that cost the lives of tens of thousands of civilians".

Abdullah has vowed to reject the result of the election, which is due on Monday, alleging he is the victim of "industrial-scale" fraud and calling for a thorough audit of ballot papers.

But Ghani claims he won fairly by at least 1m votes and said the result must be released on schedule after previous delays.

The dispute has thrown Afghanistan's first democratic transfer of power into turmoil as US-led troops withdraw after 13 years of fighting the Taliban insurgents and with aid money to the country set to fall in coming years.