Topology optimization of unilateral elastic contact problems with Tresca friction. Regularization of topology optimization problem using phase transition models. Necessary optimality condition in the form of generalized Cahn–Hilliard equation. Finite element approximation. Optimal topologies leading to reduction of maximal contact stress.