Uganda will order social media sites Twitter and Facebook blocked locally if further protests over high food and fuel prices take place because they are being used to fan unrest, a senior official said Tuesday.

Monday, soldiers and police fired teargas to disperse thousands demonstrating for a third time against rising prices and over the arrest of opposition leader Kizza Besigye and others who were charged with inciting violence in the protests.

The opposition says the demonstrations, dubbed walk to work, are to force the government to do something to curb soaring consumer prices.

If someone is telling people to go and cause mass violence and kill people and uses these media to spread such messages, I can assure you we'll not hesitate to intervene and shut down these platforms, Godfrey Mutabazi, executive director of the Uganda Communications Commission (UCC), told Reuters.

We're very alert and monitoring these mediums and if people start promoting dangerous ideas, we'll act like every country would do, he said in an interview.

The regulator relies on internet service providers following its orders and is unable to block sites itself.

UCC wrote to all internet service providers to block access to the two websites for 48 hours last week, when there were demonstrations in Kampala and at least six other towns.

Security agencies have accused the websites of spreading inflammatory messages.

Separately, the government has rejected accusations of human rights abuses during its crackdown on the protests.

Internal Affairs Minister Kirunda Kivejinja said the army and police had used appropriate methods to quell the unrest.

This is not a question of human rights but of demonstrations that were handled according to the law. We shall use the force according to the challenge we have, he told a news conference in Kampala.

Who started the quarrel? It's the abominable acts of some opposition leaders.

Last week, the International Commission of Jurists condemned the security forces for heavy-handedness in dispersing protesters and questioned the legality of charges leveled against opposition leaders.

(Editing by George Obulutsa)