In this work, we present numerical analysis for a distributed optimal control problem, with box constraint on the control, governed by a subdiffusion equation which involves a fractional derivative of order α ∈ (0, 1) in time. The fully discrete scheme is obtained by applying the conforming linear Galerkin finite element method in space, L1 scheme/backward Euler convolution quadrature in time, and the control variable by a variational type discretization. With a space mesh size h and time stepsize τ , we establish the following order of convergence for the numerical solutions of the optimal control problem: O(τ min(1/2+α− ,1) + h 2 ) in the discrete L 2 (0, T ; L 2 (Ω)) norm and O(τ α− + 2 h h 2 ) in the discrete L ∞ (0, T ; L 2 (Ω)) norm, with any small > 0 and h = ln(2+1/h). The analysis relies essentially on the maximal L p -regularity and its discrete analogue for the subdiffusion problem. Numerical experiments are provided to support the theoretical results. optimal control, time-fractional diffusion, L1 scheme, convolution quadrature, pointwise-in-time error estimate, maximal regularity. arXiv:1707.08808v2 [math.NA] 21 Dec 2017 UK.