But in the course of a weekend, he went from being an army captain to becoming the youngest leader in the world, a rise that has raised hopes but also anxieties for a poor and frequently unstable nation.
Lieutenant-Colonel Paul-Henri Sandaogo Damiba, who had just recently assumed power, was overthrown by Traore, who led a group of unhappy younger officers.
Anger over failures to end a seven-year Islamist insurgency that has cost thousands of lives and forced almost two million people from their homes was the driving force behind the most recent coup, as it was in January.
As "guarantor of national independence, territorial integrity, and continuity of the State," Traore was proclaimed president on Wednesday.
At that momentous occasion, Traore overtook Chilean President Gabriel Boric, who was two years older, as the youngest leader in the world.
The previously unknown visage of Traore is now emblazoned on pictures all around the country's capital, Ouagadougou.
Even in the main market, his photograph is for sale beside those of Jesus and Thomas Sankara, the famed radical leader who was slain in Burkina.
Born in Bondokuy, a town in western Burkina Faso, Traore attended Ouagadougou to study geology before enlisting in the army in 2010.
He received an officer's degree from the Georges Namonao Military School, a lesser-known school than the elite Kadiogo Military Academy that Damiba and other members of the elite attended.
According to a classmate who spoke to AFP, Traore finished second in his class and was "disciplined and brave."
Years of experience fighting the jihadists followed his graduation.
Prior to accepting a position in the neighboring Mali in the UN's MINUSMA peacekeeping mission in 2018, he served in the country's severely damaged north and center.
In 2020, he was named captain.
Under the condition of anonymity, a former superior officer recalled an incident that took place in 2020, just before the town of Barsalogho in central Burkina was about to be overrun by jihadists.
In order to reach Barsalogho in time to liberate the town, Traore led his soldiers on a "commando trip" through the countryside because it was thought that the road there had been mined.
Traore joined the Patriotic Movement for Preservation and Restoration (MPSR), as the junta chose to call itself, when Damiba seized control in January and deposed democratically elected president Roch Marc Christian Kabore.
Damiba elevated Traore to the position of head of artillery for the Kaya regiment in the nation's center in March.
However, it was a decision that, paradoxically, would pave the way for Damiba's own demise.
The regiment degenerated into a breeding ground for dissatisfaction, and Traore was given the responsibility by his colleagues to channel their resentment. Traore made several trips to Ouagadougou to make their case to Damiba.
After an attack on a convoy in northern Burkina last month that left 27 troops and 10 civilians dead, disillusionment with the reaction grew into fury, which then crystallized into a commitment to grab power.
According to security expert Mahamoudou Savadogo, Captain Traore "symbolizes the rank and file's and junior officers' frustration."
The struggle to reclaim control over jihadist organizations, some of which are linked to Al-Qaeda and others to the Islamic State, will be difficult for the incoming president. They began their attacks in Mali in 2015, and since then, they have made steady progress.
However, Traore made a clear critique of his predecessor by promising to do what "should have been done in the preceding eight months" "within three months."
One soldier toppling another, according to Savadogo, demonstrates "the deteriorating state of the army, which hardly exists any more and which has just torn itself apart with its umpteenth coup d'etat," the warning stated.
Traore's coup comes at a time when France and Russia are competing for influence in French-speaking Africa, where former French possessions are increasingly looking to Moscow.
During the weekend standoff with Damiba, supporters of him held a rally in Ouagadougou where they brandished Russian flags and sang anti-French chants.
Many people in a nation that is rapidly slipping into the mud appear to find hope in Traore for the time being.
The title in the daily L'Observateur Paalga on Monday was unmistakably biblical: "Ibrahim, the close companion of God, would he be able to save us?"
Start a discussion...