The generation of very high quality electron bunches (high brightness and low energy spread) from a plasma-based accelerator in the three-dimensional blowout regime using self-injection in tailored plasma density profiles is analyzed theoretically and with particle-in-cell simulations. The underlying physical mechanism that leads to the generation of high quality electrons is uncovered by tracking the trajectories of the electrons in the sheath that are trapped by the wake. Details on how the intensity of the driver and the density scale-length of the plasma control the ultimate beam quality are described. Three-dimensional particle-in-cell simulations indicate that this concept has the potential to produce beams with peak brightnesses between 10 20 and 10 21 A=m 2 =rad 2 and with absolute slice energy spreads of ∼Oð0.1Þ MeV using existing lasers or electron beams to drive nonlinear wakefields. We also show projected energy spreads as low as ∼0.3 MeV for half the charge can be generated at an optimized acceleration distance. DOI: 10.1103/PhysRevAccelBeams.20.111303 Research in plasma-based acceleration (PBA) driven by a laser pulse or a relativistic electron beam is very active [1] because the large accelerating gradients in plasma wave wakefields may lead to compact accelerators. PBA is also capable of self-generating electron bunches that have significant charge (Q), short duration (τ) and low normalized emittance (ϵ n ). A combination of these quantities define the normalized beam brightness B n ¼ 2I=ϵ 2 n where I ¼ Q=τ is the current. While PBA experiments have produced useful beams, they have not produced beams with the necessary brightness and energy spread needed to drive an x-ray free-electron-laser (X-FEL) [2] or the charge and emittance needed as an injector for a future linear collider [3].The electron bunches needed to load plasma wakefields are very short and need to be synchronized with the driver. Therefore, self-injection has been actively investigated. The threshold for self-injection of electrons into nonlinear three-dimensional (3D) plasma waves in uniform plasmas has been studied in simulations and experiments [4][5][6][7][8]. Even in simulations, this process does not appear to be capable of generating the high quality beams needed for X-FELs or a linear collider [9][10][11]. Therefore there has been much recent work on methods for generating high brightness beams through controlled injection. These ideas fall into three categories. In one, electrons are born inside the wake through field ionization where the wake potential is near a maximum which eases the trapping threshold [12][13][14]. There are now numerous variations of this idea in which the injection and wake excitation are separated [15][16][17]. In the second, one or more laser pulses are used to trigger injection inside one plasma wake bucket [18][19][20][21]. In the third, which we consider here, the effective phase velocity of the wake is slowed down either by a density transition from high to low density [22,23], or through ...