After his return to Burkina, Compaoré was stationed at the Po garrison, headquarters of an elite commando unit of Burkinabe paratroopers. He developed friendships with several young officers at Po, including Captain Thomas Sankara. When Sankara was appointed commandant of the paracommando school at Po in 1974, he brought in Compaoré as his deputy. Seven years later, when Sankara obtained a ministerial position in the Zerbo government, Compaoré became commander of the Po garrison.
Compaoré led a paracommando revolt in 1983, which resulted in the formation of a radical government headed by Sankara. Compaoré was generally regarded as second in command to Sankara in the new government. Officially, he held the post of minister of state of the presidency, and later became minister of justice as well. Compaoré also maintained his command of the Po paratroopers. He participated in the arrest of political dissidents, including former presidents Yaméogo and Saye Zerbo.
During 1987, personal disagreements between Sankara and Compaoré became increasingly evident. Sankara began to lose his grip on the direction of the regime. On 15 October 1987, fearing that he was going to be removed from power, Compaoré seized power in a bloody coup that resulted in the assassination of Sankara. At least 80 people lost their lives, including 13 of Sankara's advisors and guards. At the time, Compaoré denied having ordered the deaths, but he justified the coup by claiming that Sankara had planned to have him murdered. Reaction, both internationally and internally, was highly negative. Compaoré declared himself president on 18 October 1987, becoming Burkina Faso's sixth head of state since its 1960 independence.