Tooting horn unreasonably

While driving I tooted my horn to alert the driver in front of me who was driving slowly to speed up. A traffic police officer who was in front of my car stopped me and alleged that it was wrong for me to toot. Is it an offence to toot?
FM, Dar

Section 39B(1)(2) of the Road Traffic Act [Cap.168 R.E 2002] and regulation 39(3) of the Traffic Regulations allow tooting in very exceptional circumstances. Tooting horn is allowed only where it is necessary to do so in order to attract the attention of other road users to avoid or prevent a danger or giving a warning to another road user to avoid the dangerous approach or position which he or she is trying to take. Even where a driver toots horn to avoid or prevent danger, the tooting should not be excessive that is likely to be a nuisance or causing annoyance to other road users or people who live near the road.

In short it is an offence to toot horn unreasonably. What is unreasonable and what is not depends on the circumstances. Tooting your horn to force a driver in front of you to speed up could likely be an offence because the intention is not to avoid or prevent an accident, unless you can prove otherwise.