President Yoweri Museveni's son Muhoozi Kainerugaba is the leader of Ugandan Army. [Courtesy]

The Government of Uganda has distanced itself from remarks made by President Museveni's son, Muhoozi Kainerugaba, that the country's army would capture Nairobi.

Muhoozi, the leader of Ugandan army, sparked anger on social media, when he said it won't take him two weeks to enter Kenya, capture Nairobi and make the city a part of Uganda's territory.

"It wouldn't take us, my army and me, two weeks to capture Nairobi," he said on Twitter, a post that attracted more than 6,000 retweets and 8,500 comments.

Muhoozi went ahead to suggest that he'd live in either Riverside or Westlands upon invading Nairobi.

Shortly after his tweets went up, Muhoozi's name shot to the summit of Twitter trends in both Kenya and Uganda.

He'd later say that the post he made on Twitter was a joke misconstrued as Uganda's attempts at breaching Kenya's sovereignty.

Uganda has, nonetheless, issued a formal statement on the matter, saying the country does not conduct matters touching on foreign policy on social media platforms.

"The Ministry of Foreign Affairs of the Republic of Uganda has noted the debate on social media in respect to the relationship between Uganda and our brotherly neighbour, the Republic of Kenya," Uganda said through a press statement on Tuesday attributed to the Foreign Affairs ministry.

"The Ministry wishes to emphasise that the Government and the people of the Republic of Uganda treasure the existing strong bilateral relations between the people and the Government of the Republic of Kenya based on our shared history, common values, mutual respect, trust and the desire to build a unified East African Community.

"To this end, the Government of the Republic of Uganda wishes to reiterate its commitment to good neighbourliness, peaceful co-existence and cooperation."

After receiving a backlash on Twitter throughout Monday evening, Muhoozi said his tweets were misconstrued, and that he was only joking on the micro-blogging site.

"I would never beat up the Kenyan army because my father (President Yoweri Museveni) told me never to attempt it. So, our people in Kenya should relax," he said in a Monday evening tweet.