An astrologer who made several predictions on Facebook that Sri Lanka's president would die has been arrested.

Most Sri Lankans follow astrologers' advice, and the suspect, Vijitha Rohana Wijemuni, is a former navy sailor convicted of attempting to assassinate India's then-Prime Minister Rajiv Gandhi in 1987.

The Police Media Division said Wijemuni was arrested on Tuesday evening on the charges of making false predictions and comments that could mislead the public.

A court in the capital, Colombo, released him on bail on Wednesday.

Wijemuni posted several videos on Facebook predicting President Maithripala Sirisena would die of illness or accident before January 27.

His predictions raised concerns with top government officials, and Media Ministry Secretary Nimal Bopage asked police in December to investigate.

In the letter sent to the police chief, Mr Bopage said he suspected a possible coup and assassination attempt were behind Wijemuni's sustained campaign on the internet during the last few months.

He is the only person who has been investigated, though the government did not say if he was thought to have acted alone.

Wijemuni served two and a half years in prison for attacking Mr Gandhi with his rifle as the Indian premier inspected a naval guard of honour in Colombo.

After being released from jail, Wijemuni turned to politics and stood for parliamentary elections in 2000, before becoming an astrologer.

Most Sri Lankans follow astrology to identify auspicious times for occasions such as marriage, building houses and signing important documents.