Scroll waves in a three-dimensional medium with negative filament tension may break up and display spatiotemporal chaos. The presence of heterogeneities can influence the evolution of the medium, in particular scroll waves may pin to such heterogeneities. We show that as a result the medium may be stabilized by heterogeneities of a suitably chosen geometry. Thin rodlike heterogeneities suppress otherwise developing spatiotemporal chaos and additionally clear out already existing chaotic excitation patterns.