Officials and clerics in the world's most populous Muslim nation have banned Indonesians from celebrating Valentine's Day because they believe the observance runs against Islamic teachings.

In Banda Aceh, the capital of the devout Muslim province of Aceh, thousands of high school students held rallies rejecting the celebration of Valentine's Day.

The mayor, Illiza Sa'aduddin Djamal, and officials joined Saturday's rallies which were held in four locations in the city's downtown area.

"The Valentine's Day celebration has become a culture," Illiza said.

The festival was popularised in British culture by Shakespeare and Chaucer (Associated Press)

The mayor added that the rallies were aimed at making young people aware that Valentine's Day is not part of Islamic culture.

St Valentine's Day is thought to have roots in a pagan fertility festival in ancient Rome, was further cemented by the death of a Christian martyr called St Valentine, with the idea coming to public consciousness through British literary giants Chaucer and Shakespeare.

The bans were imposed in many Indonesian cities. A similar rally by junior high school students was held in Surabaya, Indonesia's second-largest city.

Russia also banned the celebration in certain cities for promoting "bad Western morals" (Associated Press)

In Makassar, the capital of South Sulawesi province, a noted Muslim youth group called Pemuda Muslimin Indonesia told Muslims in the province to stay away from the celebration.

The influential Indonesian Council of Clerics has repeatedly declared the 14 February celebration as an observance stemming from another faith, saying that celebrating it would be the same as promoting faiths other than Islam.

In Russia, meanwhile, the day has been banned before because, according to Grigory Bolotnov, a spokesperson at the governor's office, it is “not a Russian tradition and it doesn’t teach good moral values to Russian youth."