While many studies explain the correlation between firm-level productivity and export status entirely by better firms self-selecting into exporting, a few studies find evidence of reverse causation. Especially in developing or transition economies, exporters seem to improve performance after they start selling internationally. We provide evidence that the realization of scale economies is one possible explanation for such a learning-byexporting effect. Exporting enables small firms to expand output and exploit all scale economies that the production technology allows. With access to finance problems and weak contract enforcement at home, domestic expansion of SMEs is constrained by the necessity of awarding trade credit to new clients. We show that small firms with a lot of outstanding trade credit expand sales the most following export market entry. This is especially true if they operate in industries with higher scale economies or if they are located in provinces with weaker institutions. The same type of firms also enjoy the largest productivity gains immediately following export market entry.