Slave of the Alliance
In 2370, O'Brien was working in the station's ore processing center, and had the slave classification "theta", which was a relatively respected and privileged position. O'Brien was also occasionally recruited to repair Benjamin Sisko's raider when it was docked at the station. Sisko claimed he hated the name Miles, and instead nicknamed O'Brien "Smiley". He had a good reputation on the station for being an excellent "tinkerer and putterer".
When Smiley met Doctor Bashir in the ore processing center, he initially thought that Bashir's "wild" tales of his counterpart being Chief of Operations was simply a ruse to get him to help Bashir. However, Bashir's earnest attitude won him over, along with the realization that anything had to be better than his slavery to the Alliance. Smiley helped Bashir try to escape from the station, on the condition that he be taken along to the other side.
However, when Captain Sisko also rejected Intendant Kira Nerys's authority, Smiley changed his mind and decided to join Sisko's crew, deciding that there was something worth staying for after all. (DS9: "Crossover")
When Captain Sisko was killed by the Alliance in early 2371, Smiley took charge of the Terran Rebellion. In order to complete Benjamin Sisko's last mission, he recruited Sisko to take the place of his deceased counterpart long enough to convince Jennifer Sisko to leave the Alliance and start working for the Rebellion. (DS9: "Through the Looking Glass")
While he was aboard Deep Space 9, Smiley took the opportunity to download a large portion of the station's database, including the schematics for the USS Defiant. This information came in handy the next year, when the rebels managed to capture Terok Nor from the Alliance. Smiley used the stolen specifications to build the rebels' own warship, which they also christened Defiant. However, with the Alliance about to launch a counterattack to recapture the station, Smiley once again recruited Sisko in order to help them finish construction of the Defiant in time.
Smiley piloted the Defiant during the Battle of Terok Nor, although he was replaced by Sisko partway through, because Sisko had greater experience flying the little warship. Following the successful conclusion of the battle, Smiley sent Sisko back home. (DS9: "Shattered Mirror")
In 2375, Smiley was still in command of the rebellion on Terok Nor. He commanded the Defiant when it pursued Brunt's ship as it stole a cloaking device from the station, and later negotiated Regent Worf's surrender and capture. (DS9: "The Emperor's New Cloak")