Administrators said they were shutting down the website
Uganda's defence ministry has ordered its website to be closed after hackers published anti-Israel messages on it.
The posts, which first appeared last month, accused the European Union of standing by "while Israel kills the Palestinians".
The hackers also posted flags of Turkey above the items, which called the EU "dishonourable", on the home page.
The ministry of defence said the posts did not represent the views of the Ugandan government or military.
Army spokesman Major Felix Kulayigye told the BBC News website on Monday: "One of our officers opened the [Ugandan military] website and this material was there.
"It condemned the fact that the European Union stood by while Israelis were killing Palestinians. What's on the website is not our position."
Maj Kulayigye said the administrator of the website, Bankshire Technologies, had finally moved to shut it down on Monday after first being asked to do so at the end of February.
"The first action was to ask our hosts to switch it off so they can remove these statements and investigate the origin of these messages," he said.
"They didn't stop it as fast as we wanted; they said they misunderstood us. It was shut down this morning."
Bankshire's client relations manager in Kampala, Charles Mugabi, told the BBC News website the delay had arisen through a misunderstanding between the administrator and the ministry of defence.
Mr Mugabi said: "We thought the ministry of defence was responsible for managing the content of the website. This was a misunderstanding and we are now closing it.
"This is extremely outrageous. We are very concerned and we want to find out who are the hackers who put this malicious information on the website."
The hackers called themselves "the Ayyildiz team" and their posts, signed by "Mustafa Kemal Ataturk", claimed there was genocide against Palestinians in Gaza.
One of the posts, addressed to the EU, said: "If you wouldn't be without honour you would not watch now while Israel kills the Palestinians."
It added: "When Turkey makes any operation you are loud, you dishonourable dogs; in front of your eyes there is genocide in Palestine, innocent people are killed."
It follows Israel's 22-day offensive at the beginning of this year in the Gaza Strip, where more than 1,300 Palestinians died.
Israel says it took care to minimise civilian casualties.
In a statement on Sunday, Uganda's foreign minister sought to make clear the posts did not represent the views of his government.
Henry Oryem Okello said: "We condemn all killing of civilians and the destruction of property by either side in this conflict."