Context: The detailed physical processes that lead to the formation of massive stars are still unknown. Observations that probe linear scales as small as 100 AU are necessary for improving our understanding in this area.
Aims: We present high angular-resolution and high-sensitivity multi-frequency radio observations of the deeply embedded massive protostar located in the IRAS 20126+4104 core region, with the aim of investigating the nature of the radio continuum emission from the deeply embedded massive protostar.
Methods: The observations were performed with the Very Large Array in several continuum bands with wavelengths between 20 and 0.7 cm in the A and/or B configurations.
Results: At 3.6 cm we resolve the emission of the IRAS 20126+4104 core into 3 components. The emission from the two northern sources is consistent with free-free emission from ionized gas with a density gradient. Most likely the ionization is caused by UV radiation from the cooling region of a shock; i.e. the ionization is caused by the jet driven by the IRAS 20126+4104 protostar. The morphology and measured flux densities of the southern source is consistent with emission from an optically thin jet, most likely also due to shock ionization. A simple radiative transfer model shows that the spectral energy distribution of IRAS 20126+4104 is consistent with an accretion disk embedded in a spherical halo. We also report the discovery of a highly variable radio source near the IRAS 20126+4104 core, which is most likely gyrosynchotron emission from a low-mass pre-main sequence star.