In this paper we present the first experimental results obtained in the CASTOR tokamak by using a segmented biasing electrode, which is composed of five segments radially separated by 3 mm. The basic idea of choosing such configuration was to allow a spatial distribution of the biasing voltage in the radial direction. In the described experiments, one or more selected segments can be biased up to +300V, while the remaining segments can be either grounded or floating. Two rake probes measure the edge radial profiles of the floating potential and the ion saturation current at the top and low field side of the torus. A Gundestrup probe, located at the top of the torus, measures the parallel and perpendicular Mach numbers together with the local electron temperature and density. A clear and reproducible transition to a regime with improved particle confinement is routinely observed, if the electrode is inserted deep enough into the plasma (r/a ≈ 0.5) and if one or two segments are biased up to +250V (the remaining segments are floating). The steepening of the radial profiles of the plasma density and potential demonstrate the formation of a transport barrier just inside the last closed flux surface. Fast relaxations of the edge profiles, with a frequency of about 10 kHz or higher, are observed when the value of the average radial electric field within the barrier reaches values of about 20 kV/m and the density gradient increases up to a factor 3 with respect to the ohmic phase. A detailed analysis of the spatial-temporal behavior of these relaxations is presented.