By Goran Tomasevic and Njuwa Maina

BUJUMBURA (Reuters) - Burundian President Pierre Nkurunziza on Sunday made his first public appearance in the capital Bujumbura since an attempted coup last week failed to oust him, warning of a threat posed by Islamist militants from Somalia.

The east African nation was plunged into crisis after Nkurunziza said he was seeking a third term of office.

Critics said the move would be unconstitutional, and there have been almost daily protests since Nkurunziza's announcement, stirring memories of an ethnically driven civil war that ended a decade ago.

At a news conference, Nkurunziza, who has not been seen in the capital for days, did not address the crisis in his country but said he was "very preoccupied" by the threat posed by the al Qaeda-linked militant group al Shabaab.

"We take seriously the threat of al Shabaab," said Nkurunziza.

He did not elaborate, but Burundi contributes forces to an African Union peacekeeping mission battling al Shabaab in Somalia. In recent years, the group has attacked Kenya and Uganda, which also provide troops.

A spokesman for the Islamist group said Nkurunziza's remarks were "dumbfounding" and said the problems in Burundi were "clearly domestic."

"We think that this is an attempt by him to appease his people, who are standing in the streets protesting against his dictatorship, or to divert the world's attention from him while he possibly prepares his mass revenge," Sheikh Ali Mahamud Rage said in a statement to Reuters.

A leader of a group of Burundian civil society groups, Vital Nshimirimana, said demonstrations against Nkurunziza's third term bid, which had largely come to a halt in recent days, would resume on Monday.

"We ask the international community to follow closely the situation in Burundi in order to stop the harsh reprisal against protesters, civil society activists and opposition leaders," Nshimirimana said in a statement.

OLD WOUNDS

Until the coup attempt, protests had occurred almost daily in the outskirts of Bujumbura. Protesters hurled rocks while police fired tear gas, water cannon and were also seen firing guns at the protesters.

Story continues

Diplomats say the longer unrest continues the more chance that a conflict, which up until now has been largely a struggle for power, reopens old wounds in a region with a history of ethnic killing.

More than 105,000 people have fled to neighboring states, including next-door Rwanda, with the same ethnic mix as Burundi and which was torn apart by a genocide in 1994 that killed 800,000 mostly Tutsis and moderate Hutus.

At the Gashora camp in Rwanda, Hakizimana Leonidas, a farmer who said he was a Tutsi, said he fled Burundi a day after last week's coup attempt.

"I want to see Burundi as a peaceful country but the problem is that those who could be protecting us are the ones causing chaos," said Leonidas, 46.

The constitution and a peace deal that ended the civil war both specify a two-term presidential limit. But Nkurunziza is seeking a third term anyway, relying on a court ruling that his first term does not count because he was appointed by parliament, not elected. His opponents and some donors have questioned the court's impartiality.

The heavy-handed response of the police to demonstrations in recent weeks has drawn stern rebukes from Western donors, who have urged the president not to run again, while the African Union condemned any attempt to seize power through violence.

Pope Francis called for an end to the violence in Burundi during prayers held at St Peter's Square in the Vatican.

Asking for a prayer for the people of Burundi, he said: "May the Lord help them to escape from violence and act responsibly for the good of the country."

In March, the Catholic church in Burundi, which represents more than two-thirds of the population, came out against the president seeking a third term.

(Additional reporting by Clement Uwiringiyimana and James Mackenzie in Rome; Writing by Edith Honan; Editing by Giles Elgood and Rosalind Russell)