Ugandan President Yoweri Museveni fired his son as commander of the nation's infantry forces Tuesday after the son tweeted an unprovoked threat to capture the capital of neighboring Kenya, drawing widespread concern in East Africa.

Lt. Gen. Muhoozi Kainerugaba, dubbed 'the tweeting general' of Uganda, in recent months had sparked anger among some Ugandans who see his frequent posts on Twitter as provocative and sometimes even dangerous.

He has tweeted in support of the Tigray rebels fighting Ethiopian federal troops. He's voiced support for violent rebels fighting in eastern Congo. He said all Africans support Russia in its war in Ukraine. Bizarrely, he recently said he was offering 100 long-horned cattle — apparently as bride price — for Italy’s incoming female prime minister.

UGANDA’S LATEST OUTBREAK OF EBOLA KILLS ITS FIRST HEALTH WORKER

Some of Kainerugaba’s supporters say his tweets are attempts at humor and shouldn’t be taken seriously. But many others see a bigger problem. As an army officer, he is constitutionally barred from engaging in partisan politics and some Ugandans point out that any other soldier tweeting like Kainerugaba would be court-martialed.

"It wouldn’t take us, my army and me, 2 weeks to capture Nairobi," he tweeted Monday.

Uganda military

Son of Uganda's President Yoweri Museveni, Lt. Gen. Muhoozi Kainerugaba, right, speaks to Attorney General Kiryowa Kiwanuka, left, at a "Thanksgiving" ceremony in Entebbe, Uganda, on May 7, 2022. (AP Photo/Hajarah Nalwadda)

That threat to seize the capital of Kenya went too far for his father, an authoritarian leader who has held power since 1986.

Kenyan President William Ruto, who took power last month, is friendly with Museveni, whom he described as the region's "father" during his inauguration.

OUTBREAK OF DEADLY CHILDHOOD DISEASES RISE IN ETHIOPIA'S TIGRAY, WAR BLAMED FOR SLOWING VACCINATIONS

Kainerugaba's tweets exasperated many Kenyans, and the foreign minister tweeted Tuesday that he had a meeting with the Ugandan ambassador. Uganda's foreign ministry dismissed Kainerugaba's tweets in a statement that spoke of a "harmonious relationship that we value."

Kainerugaba, the pillar of his father’s personal security apparatus, has been the de facto head of Uganda's military, with his allies strategically deployed in command positions across the security services, according to observers. Although he was sacked from his post as head of Uganda's infantry forces, Kainerugaba still was promoted to a four-star general and will remain a military adviser to his father, according to a statement issued by the military Tuesday. He was replaced as infantry commander by Lt. Gen. Kayanja Muhanga.

OUTBREAK OF DEADLY CHILDHOOD DISEASES RISE IN ETHIOPIA'S TIGRAY, WAR BLAMED FOR SLOWING VACCINATIONS

Many Ugandans believe Kainerugaba is being groomed to replace Museveni as president, allegations the president has long denied.

Kainerugaba’s associates describe him as a dedicated military officer who often eschews ostentatious displays of power and wealth. He attended military schools in the U.S. and Britain before taking charge of a presidential guard unit that has since been expanded into an elite group of special forces.