The Bajorans bought many of their weapons to fight the Cardassians from arms dealers like Hagath. After the Cardassians left, the Bajorans were willing to tolerate further activity from those dealers within their territory because, as Kira Nerys said, they would not have won without people like him.
Gaila, a cousin of Quark, was an arms dealer in business together with Hagath. He briefly recruited Quark into his business in 2373, hoping that he could retire to his own moon. Quark, however, had a change of heart and decided not to remain in the business. (DS9: "Business as Usual")