We report the results of experiments on laser-wakefield acceleration in a novel two-stage gas target with independently adjustable density and atomic-composition profiles. We were able to tailor these profiles in a way that led to the separation of the processes of electron injection and acceleration and permitted independent control of both. This resulted in the generation of stable, quasimonoenergetic electron beams with central energy tunable in 50-300 MeV range. For the first time, we are able to independently control the beam charge and energy spread over the entire tunability range. Over the past several decades, the physics of laserwakefield acceleration (LWFA) has been the subject of intense investigation [1][2][3][4][5]. The impetus for this interest has been LWFA's potentially transformative features, several of which have been demonstrated experimentally, including an orders-of-magnitude higher acceleration gradient (compared to conventional radio-frequency linear accelerators), monoenergicity, and femtosecond pulse duration. Among other applications, LWFA has been integral to the development of compact x-ray sources based on various mechanisms, such as betatron radiation [6,7], conventional undulator-based synchrotron radiation [8,9], and inverse Compton scattering [10][11][12]. Independent control of the electron beam parameters is one of the most significant advances still needed in order for these applications to become practical.There has been recent progress towards achieving this goal using the following approaches: (i) optical injection, involving two independent laser pulses, one to drive the wake and the other to inject electrons [13][14][15][16][17]; (ii) plasmaprofile tailoring, either by means of a machining laser pulse [18][19][20] or by the introduction of obstacles into the gas flow [21-23]; or (iii) the use of distinct media for injection and acceleration [24][25][26][27][28]. While these methods have resulted in tunable quasimonoenergetic electron beams, none of them were able to control the energy spread and charge as the beam was tuned in energy. This primarily arose from the lack of independent control of both the injection and acceleration processes.We report here an experimental study showing that the injection and acceleration processes can be independently controlled by the use of a single laser pulse focused onto a composite gas target, created by two overlapped gas jets, with independently adjustable gradient profiles of gas density and atomic composition. We were able to create profiles with three distinct regions. In the first region, the plasma wave grew and an acceleration bucket was formed. In the second region, ionization-assisted injection was localized. Finally, in the third region, acceleration and electron-bunch phase-space rotation occurred. As a result, we were able to tune e-beam energy while having control over both the electron charge and energy spread. The stable, quasimonoenergetic, and tunable e beams proved to be critical for generating quasimonoenergetic ...