In 2369 the Cardassian Union withdrew from Bajor after decades of occupation, and Starfleet took over the station Terok Nor as Deep Space Nine.
By 2369 the cost of Bajoran resistance had made the occupation of Bajor too expensive for the Cardassian Union, and it pulled out of the system. The Cardassians stripped their mining station Terok Nor as they left, wrecking much of the equipment and killing Bajoran workers in the process.
The new Bajoran Provisional Government asked the Federation for help. Starfleet assigned Commander Benjamin Sisko to run the station, now called Deep Space Nine, with Major Kira Nerys of the Bajoran Militia as his first officer. The goal was to help Bajor recover and prepare it for membership in the Federation.
The withdrawal left Bajor deeply scarred, with damaged land, a divided government and a strong distrust of outsiders. It also left Bajorans and Cardassians on both sides of the border with unresolved grievances. Within months the discovery of the nearby wormhole made the system far more valuable, and the Cardassians soon regretted having left.