A lengthy speech by Uganda’s 71-year-old president, Yoweri Museveni, has become a hit on social media.

The elderly statesman was speaking at the 40th anniversary celebrations of the raid on Entebbe, during which Israeli commandos freed hostages who had been taken by Palestinian and German terrorists from a flight from Tel Aviv.

It was supposed to be an event that bonded Israel with Uganda, but to onlookers’ consternation Museveni continually referred to Israel as Palestine in his rambling speech. Given that the Israeli prime minister, Binyamin Netanyahu, his wife and dignitaries were present, this error was unexpected, particularly as Netanyahu’s brother Yonatan was killed in the raid.

Museveni told Netanyahu: “I want to thank him for turning this sad story 40 years ago into yet another instrument of bonding the holy land of Israel-Palestine, with the heartland Uganda in particular, and Africa in general.”

This was startling enough, but those who thought Museveni’s speech would return to the normal world would be disappointed; he had only just started. “The sad event, 40 years ago, turned to another bond linking Palestine to Africa. I say this is yet another bond between Africa and Palestine because there were earlier bondage events,” he pronounced.

At this point, cameras covering the event focused on Netanyahu, who looked on impassively. Museveni continued on his strange theme, outlining his own version of the nativity story before going on to describe King Herod as “a bad gentleman or something like that”.

Later in his speech, the Ugandan president called for unity between Israel and Palestine and offered to mediate between the two. “I have never mediated in the issue of Palestine, but if you invited me I would give very clear ideas in a very short time,” he announced.

Then Museveni praised the Jews for avoiding what he called the British nonsense. “You know our British friends are fond of, er ... sometimes doing all sorts of nonsensical actions,” he added. Finally Museveni revealed his dislike for long international meetings and confessed that he sleeps during many of them.

For his part, Netanyahu has said his country’s raid on Entebbe “changed the course” of his life. “International terrorism suffered a stinging defeat,” he said of the 1976 rescue mission. The Entebbe raid is viewed as a seminal event in Israeli history and is widely seen as one of the country’s greatest military successes.

Museveni’s words have gone viral, with thousands poking fun at the president, forcing his press secretary, Don Wanyama, to attempt some nifty damage limitation on Facebook. “Now, I have heard the president’s reference to the geographical space that was Palestine before the state of Israel took root in 1948 caused some unnecessary excitement, engineered by some elements, who probably didn’t like the president’s hard truths on the two-state model,” states Wanyama. “Well, that’s what leadership calls for, saying things as they are.”

Museveni critics have not been so forgiving, however. “The day Israel was referred to as state of Palestine by Uganda’s dictator Museveni,” said vocal Museveni opponent, Frederick Womakuyu. “Museveni will soon read a love letter in parliament as his speech.”

Israelis have been equally scornful. One radio broadcaster is said to have cut off the speech with the words “We’ve heard enough”, while others have complained that Netanyahu’s trip was a waste of taxpayers’ money. For its part, the Jerusalem Post likened Museveni to a Ugandan Donald Trump – except that Trump is seeking election while Museveni has clung to power for 30 years.

In fact, Museveni’s tenure may be coming to an end. Uganda’s constitution states that a president must be under 75, which means he will be too old at the next elections in 2021. However, his National Resistance Movement is expected to amend the constitution.