The Turks defeated the Mamluks in short order by allowed some to remain in power as their representatives

Could you correct the punctuation please?
The Turks defeated the Mamluks in short order by allowed some to remain in power as their representatives.