Thanks both to their ruthless tactics and to a now continuous flow of Allied military aid, Tito's Communist Partisans emerged at the end of the war as the undisputed masters of Yugoslavia. They marked their victory with mass executions of tens of thousands of Croat and Slovene militiamen who had surrendered to them at the conclusion of hostilities. Tito awarded himself the title of Marshal and ruled Yugoslavia as a one-party dictatorship for 35 years until his death.

Because Tito broke with Stalin soon after the end of World War II, he became a beneficiary of the Cold War, receiving economic and military assistance as well as diplomatic backing from the West. While Tito was one of the founding members of the international non-aligned movement and remained a staunch proponent of his own brand of Communism, it was economic and military aid supplied by the West that enabled him to build the Yugoslav National Army (JNA) into the fourth largest military force in Europe. When rumors of Tito's impending death in the 1970s sparked fears of Soviet intervention, US Secretary of State Henry Kissinger declared that the United States viewed Yugoslavia as vital to its national interest and would risk nuclear war in its defense.

In Tito's Communist Yugoslavia overt manifestations of nationalism were proscribed and severe limits were imposed on religion, since both were seen as rivals to the official ideology. The country was reconstituted along federal lines: Bosnia-Herzegovina, restored within her pre-1918 borders, became one of six constituent republics (the others were Serbia, Croatia, Montenegro, Macedonia, and Slovenia). In the Tito era, for the first time since World War I, Bosnian Muslims received official recognition of their separate identity (i.e. they were no longer forced to declare themselves as Serbs or Croats). Bosnia and its people had suffered terribly during the war, but the city of Sarajevo had once again emerged physically unscathed; it became the center of a cultural and economic revival. Although development in Bosnia lagged behind the levels attained by the more prosperous republics, in the decades following the end of the war Bosnia was transformed from a largely agricultural backwater into a modern, industrialized society.

Public worship and religiously-based customs were discouraged or banned outright under Tito's rule (this affected Islam as severely as it did the Christian denominations), but there was fairly broad freedom of cultural expression, as long as it did not appear to pose a political threat. In the early 1970s there was an economic boom, fueled in large part by money borrowed from abroad, and much of the country enjoyed a period of unprecedented prosperity (the claim that Serbia did not get as much of a share of this prosperity as certain other republics later became a theme of the Serbian nationalists' politics of resentment).

All of this began to unravel after Tito's death in 1980. Yugoslavia was ruled for the next decade by a committee composed of the presidents of the six republics and two autonomous regions, with members taking turns as federal president. The economic boom had also come apart, the foreign loans that had financed the prosperity of the early 70s dried up, and rivalries among the republics ensued as they began to compete for pieces of an ever-shrinking federal pie. In theory, ethnic tensions had been overcome by socialist internationalism, but in practice national groups had long been played off against each other by the regime. While local Communist party leaders in each federal republic were given control of political affairs and patronage, ethnic Serbs were allowed to dominate the JNA officers' corps as well as key positions in state enterprises.

By the end of the 1980s, Communism as an ideology and state system was coming undone throughout the entire region. Nationalism was resurrected to fill the ideological void, as each of Yugoslavia's member republics sought to make its own way. The collapse of Soviet hegemony in Eastern Europe and the end of the Cold War also heralded the disintegration of the Socialist Federal Republic of Yugoslavia---a structure built by Tito but kept going in large part by his success in exploiting Cold-War rivalries. In the first multi-party elections, held in 1990, the Communist Party carried only Serbia and Montenegro; in all the other republics, parties calling for greater autonomy from Belgrade or outright independence won large majorities.