Abstract. We study a general Dirichlet problem for the complex Monge-Ampère operator, with maximal plurisubharmonic functions as boundary data.1. Introduction. In classical potential theory, the Riesz representation theorem says that every negative subharmonic function can be written as a sum of a Green potential and a harmonic function. The smallest harmonic majorant of the potential is zero and the harmonic function is determined by its behaviour near the boundary. So it is natural to say that the harmonic part is the boundary value of the subharmonic function.The purpose of this paper is to formulate and study a pluripotential analogue of the classical setting.In pluripotential theory, the reminiscence of the Riesz representation theorem is inequality ( * ) below. Here the harmonic functions are replaced by the so called maximal functions, already considered by Bremermann in [6]. We refer to the books [15] and [16] for background and references.We will find that important results from classical potential theory carry over to our setting but we will also note some significant differences.In this paper we study a particular class of plurisubharmonic functions, the class E, defined in [11]. The reason for this choice is that the complex Monge-Ampère operator (dd c u) n is well-defined in this class and the maximal functions u in E are precisely the functions with (dd c u) n = 0.Subclasses of functions in E with continuous boundary values have been studied in [1] and [8]. The case of upper semicontinuous boundary values was considered in [14]. Here, we allow any bounded maximal function as boundary value when we show existence and uniqueness in the Dirichlet problem for the complex Monge-Ampère operator.