Toll-like receptor 9 (TLR9) recognizes both bacterial and self-DNA and it is abundantly expressed in the gastrointestinal tract. In this study, we investigated the influences of both bacterial DNA and specific short DNA sequences on TLR9-mediated gastrointestinal cancer cell invasion. We assessed the effect of various DNA ligands on cellular invasion and on TLR9 and matrix metalloproteinase expression of three gastrointestinal cancer cell lines. DNA-ligands described in this study include CpG-ODN M362, 9-mer (hairpin), human telomeric sequence h-Tel22 G-quadruplex, and bacterial DNAs from Escherichia coli and Helicobacter pylori. All of the DNAs studied were demonstrated to induce invasion in the studied cells. The DNA-induced invasion was inhibited with a broad-spectrum MMP inhibitor and partly also with chloroquine suggesting that it could be mediated via MMP activation, endosomal signaling, and TLR9. Interestingly, H. pylori DNA was shown to induce a more pronounced invasion in a gastric cancer cell line than in the other cell lines. Our results suggest that bacterial DNA as well as deoxynucleotides having stable secondary structures (i.e. hairpins or G-quadruplex structures) may serve as endogenous, invasion-inducing TLR9-ligands and promote local progression and metastasis of cancers in the alimentary tract. © 2012 APMIS.