  Paul Erd\H{o}s suggested the following problem: Determine or estimate the
number of maximal triangle-free graphs on $n$ vertices. Here we show that the
number of maximal triangle-free graphs is at most $2^{n^2/8+o(n^2)}$, which
matches the previously known lower bound. Our proof uses among others the
Ruzsa-Szemer\'{e}di triangle removal lemma, and recent results on
characterizing of the structure of independent sets in hypergraphs.
