Given a system $\dot x = f(x)$, $x \in \mathbb{R}^n$ with a smooth $f(x)$. Let $D$ be a set in $\mathbb{R}^n$ with a smooth boundary $\partial D$ such that $\left.\langle f(x), n(x) \rangle \right|_{\partial D} \leqslant 0$, where $n(x)$ is an exterior normal vector. Is that true, that $D$ is an invariant set: $x(t,x_0)$ lies in $D$ for every $t$ if $x_0 \in D$?
Smoothness is necessary, without smoothness it is not true.