We examine the disc–jet connection in stellar mass and supermassive black holes by investigating the properties of their compact emission in the X‐ray and radio bands. We compile a sample of ∼100 active galactic nuclei with measured masses, 5‐GHz core emission, and 2–10 keV luminosities, together with eight galactic black holes with a total of ∼50 simultaneous observations in the radio and X‐ray bands. Using this sample, we study the correlations between the radio (LR) and the X‐ray (LX) luminosity and the black hole mass (M). We find that the radio luminosity is correlated with bothM and LX, at a highly significant level. In particular, we show that the sources define a ‘Fundamental Plane’ in the three‐dimensional (log LR, log LX, log M) space, given by log LR= (0.60+0.11−0.11) log LX+ (0.78+0.11−0.09) log M+ 7.33+4.05−4.07, with a substantial scatter of σR= 0.88. We compare our results to the theoretical relations between radio flux, black hole mass, and accretion rate derived by Heinz & Sunyaev. Such relations depend only on the assumed accretion model and on the observed radio spectral index. Therefore, we are able to show that the X‐ray emission from black holes accreting at less than a few per cent of the Eddington rate is unlikely to be produced by radiatively efficient accretion, and is marginally consistent with optically thin synchrotron emission from the jet. On the other hand, models for radiatively inefficient accretion flows seem to agree well with the data.