In this paper, we give an optimal regularity result for some class of weakly harmonic maps from a Riemannian manifold $M$ into a static Lorentzian manifold. Our main result is the following: For such class of weakly harmonic map $w$, there exists closed set $\Sigma\subset M$ such that $w$ is $C^{\infty}$ in $M \setminus\Sigma$ and the Hausdorff dimension of $\Sigma$ is less than or equal to $\dim M-3$.