This paper presents a formulation and a numerical scheme for fractional optimal control (FOC) for a class of distributed systems. The fractional derivative is defined in the Caputo sense. The performance index of an FOC problem (FOCP) is considered as a function of both the state and the control variables, and the dynamic constraints are expressed by partial fractional differential equations. Eigenfunctions are used to eliminate the space parameter and to define the problem in terms of a set of state and control variables. This leads to a multi-FOCP in which each FOCP could be solved independently. Several other strategies are pointed out to reduce the problem to a finite dimensional space, some of which may not provide a decoupled set of equations. The calculus of variations, the Lagrange multiplier, and the formula for fractional integration by parts are used to obtain Euler–Lagrange equations for the problem. In the proposed technique, the FOC equations are reduced to Volterra-type integral equations. The time domain is discretized into several segments and a time marching scheme is used to obtain the response at discrete time points. For a linear case, the numerical technique results into a set of algebraic equations, which can be solved using a direct or an iterative scheme. The problem is solved for different number of eigenfunctions and time discretizations. Numerical results show that only a few eigenfunctions are sufficient to obtain good results, and the solutions converge as the size of the time step is reduced. The formulation presented is simple and can be extended to FOC of other distributed systems.