When I meet my fellow African leaders in Addis Ababa this weekend, we will be sending a powerful message to the world; we will be demonstrating continental unity against extremists. It will be the latest victory for Somalia in an information war against an enemy that is firmly on the back foot.
There is no such thing as a legitimate al-Shabab government.
Much of the commentary in the aftermath of the Westgate atrocity has suggested the attack emboldened al-Shabab. Allow me to argue that it demonstrated precisely the opposite. It is often said that the media has a short attention span, but one does not need a great memory to recall how, before 2011, al-Shabab controlled a great majority of Mogadishu, in addition to the strategic port cities of Merka and Kismayo, which served as their financial and logistical hub, and whole swathes of Somalia. Most of my country was then victim to their perverted form of "governance" - beatings, beheadings, amputations, extortion, and a complete betrayal of Islamic practice. There is no such thing as a legitimate al-Shabab government. Their rule was human rights abuse plain and simple.
Those who do not know Somalia may have been fooled into thinking, both by al-Shabab's bombastic propaganda, and the terrible events at Westgate, that the extremist group is more powerful than ever. Yet even a cursory glance across the country will tell you that we have driven them out of Mogadishu, expelled them from Kismayo and degraded their capabilities so extensively that they have only dwindling supplies of men, materiel and funding. They have been forced underground.
Are they down? Certainly. They are on their last knees. Have we eradicated them completely? Not yet. We now need the tools to finish the job and we must strike while the momentum is with us, as our American partners did at Barawe on October 4. As the UN's Special Representative of the Secretary General has argued powerfully in recent weeks, paying a small price now to increase the capacity of Somali and African Union forces will save us all paying a much higher price later. The fact, for example, that neither the African Union Mission in Somalia (AMISOM) nor the Somali National Army has a single helicopter in a country the size of Afghanistan is simply not good enough. We must continue to ruthlessly deny our enemies territory.
Military action is essential in this fight. But let no one think we believe for a minute there can be a military solution. We know we have to go right back to the start of the terrorist production line to halt the supply of innocent young men into the arms of unscrupulous militants for whom are used as nothing more than cannon fodder. We have not backed up our military success with sufficient progress in the information war. We must now do much better in the battle of ideas.
Considering we are facing an enemy whose ideology is considered completely redundant by 99 percent of the population, we begin with an important advantage. When I read one comment from the Shabaab leadership that the Westgate slaughter of innocent and unarmed men, women and children was one of the "epic battles" in the history of Islam, it reminded me how badly educated they are, how divorced from reality they have become and how utterly irrelevant they are to Somali aspirations for a better future. We must highlight these problems vigorously and remorselessly.
The struggle against extremism needs to take place on the broadest possible front, from the parched Somali desert to flourishing American cities, from mosques to internet chat forums. It must be prosecuted on digital and social media, on the airwaves and in the newspapers, in schools and universities. Just as poison requires an antidote, extremist ideology must meet with innovative strategies, cutting-edge technologies, comprehensive education and vigorous communications.
Education is key
The education of our people must be a national priority.
Now that the military campaign is almost over, education must become the new frontline. Two decades of fighting have denied a generation of Somalis from even the most basic education. The education of our people must be a national priority. We must fight al-Shabab in the classroom, defeating them with books as well as with bullets on the battlefield. The government's recently announced "back to school" campaign aims to get one million young girls and boys into the classroom, where they will enjoy the most fundamental human right and learn the skills needed to build productive careers and fulfilled lives. That will be another blow to the extremists' ability to recruit vulnerable youth.
Extremism is like a cancer that needs treatment. International cooperation is essential, especially considering we have Somalis living all over the world. As US Congressman Keith Ellison, whom I had the pleasure of welcoming to Mogadishu earlier this year, wrote recently, the best way to neutralise al-Shabab is to support Somalia. We need the US and UK governments, for example, to work directly with our government, take advantage of our pool of highly educated diaspora Somalis, and collaborate on deradicalisation and countering violent extremism programmes.
We must send Somalia's most distinguished religious leaders to educate young Somalis abroad, to ensure they are protected intellectually against any attempts of brainwashing. Last month, more than 160 distinguished clerics in Mogadishu issued a landmark fatwa against al-Shabab, forcefully declaring they had strayed from Islam. The scholars stated it was a religious obligation to turn the terrorists into the authorities and offering them sanctuary was prohibited. This was a body blow to our enemies - Islamic authorities publicly rejecting Shabab's perversion of our faith - and we must provide many more.
Economic recovery will be another nail in the coffin of extremism. Only a few days ago, many Somalis and Eritreans lost their lives after the boat they were travelling on to Europe sank off the Italian coast. The tragedy demonstrated the great scale of the development challenge that faces us as we seek to build a country from the ashes of devastating conflict. We are driving Somalia from emergency to recovery and from recovery to development and reconstruction. We are making progress every day - through improved security, judicial and public financial management reform. Tax collection will, in time, allow us to stand on our own feet and wean ourselves off international support.
How often we hear those two words regarding Somalia: international support. We are grateful to our partners for enabling it. We are also only too aware of the difficulty in maintaining it. Take the recent decision to close money transfer accounts, a move that affects remittances, which are worth double the amount of aid flows coming into Somalia. At a stroke a single decision undermined the international community's support for Somalia. We must do better than that.
Let me assure our partners, as I remind Somalis, that we are on the right path. Security is improving, new political institutions are taking root, a new constitution and democratic elections are on the horizon, and our enemies are on the decline. We must give them their just deserts - and make them totally irrelevant. The triumph of the many Somalis will be the defeat of the few. Our success will be their failure.
His Excellency Hassan Sheikh Mohamud is the President of the Federal Republic of Somalia.
Follow him @TheVillaSomalia
The views expressed in this article are the author's own and do not necessarily reflect Al Jazeera's editorial policy.