We prove a version of the derandomized Direct Product Lemma fordeterministic space-bounded algorithms. Suppose a Boolean function$g:\{0,1\}^n\to\{0,1\}$ cannot be computed on more than $1-\delta$fraction of inputs by any deterministic time $T$ and space $S$algorithm, where $\delta\leq 1/t$ for some $t$. Then, for $t$-stepwalks $w=(v_1,\dots, v_t)$ in some explicit $d$-regular expander graphon $2^n$ vertices, the function$g'(w)\stackrel{\mathrm{def}}{=}g(v_1)\dots g(v_t)$ cannot be computedon more than $1-\Omega(t\delta)$ fraction of inputs by anydeterministic time $\approx T/d^t-\poly(n)$ and space $\approxS-O(t)$. As an application, by iterating this construction, we get adeterministic linear-space ``worst-case to constant average-case''hardness amplification reduction, as well as a family of logspaceencodable/decodable error-correcting codes that can correct up to aconstant fraction of errors. Logspace encodable/decodable codes (withlinear-time encoding and decoding) were previously constructed bySpielman~\cite{Spi96}. Our codes have weaker parameters (encodinglength is polynomial, rather than linear), but have a conceptuallysimpler construction. The proof of our Direct Product Lemma isinspired by Dinur's remarkable recent proof of the PCP theorem by gapamplification using expanders~\cite{Din05}.