When the Cardassian occupation of Bajor ended in 2369, the mining space station Terok Nor was left abandoned, its systems ripped out. By invitation of the Bajoran provisional government, Starfleet stepped in to oversee the rebuilding and day-to-day operations of the newly christened Deep Space Nine.
The years of Starfleet's nonintervention into Cardassian matters, however, had taken its toll on relations with the Bajorans. Consequently, Starfleet's position was a tenuous one; many Bajorans, suspicious and hostile as a result of decades of Cardassian oppression and brutality, did not greet the Federation's presence with open arms. The Federation's assistance is put to the test as DS9 becomes a center of travel and commerce that stretches into the Gamma Quadrant.
Star Trek: Deep Space Nine Ended after Season 7
UPN aired the final episode on Wednesday 2nd June 1999