Context : Aims : We aim to derive a stability condition for non-isothermal Bonnor–Ebert spheres and compare the physical properties of critical non-isothermal and isothermal gas spheres . These configurations can serve as models for prestellar cores before gravitational collapse . Methods : A stability condition for non–isothermal spheres is derived by constructing an expression for the derivative of boundary pressure with respect to core volume . The temperature distribution is determined by means of radiative transfer calculations . Based on the stability analysis , we derive the physical parameters of critical cores for the mass range 0.1 - 5.0 M _ { \odot } . In addition , the properties of roughly Jupiter-mass cores are briefly examined . Results : At the low-mass end the critical non-isothermal sphere has lower central density and a slightly larger physical radius than the corresponding isothermal sphere ( i.e . one with the same mass and average temperature ) . The temperature decrease towards the core centre becomes steeper towards smaller masses as the central density becomes higher . The slope depends on the adopted dust model . We find that the critical dimensionless radius increases above the isothermal value \xi _ { 0 } = 6.45 for very low-mass cores ( < 0.2 M _ { \odot } ) . However , in the mass-range studied here the changes are within 5 % from the isothermal value . Conclusions : The density structures of non-isothermal and isothermal Bonnor–Ebert spheres for a given mass are fairly similar . However , the present models predict clear differences in the average temperatures for the same physical radius . Especially for low-mass cores , the temperature gradient probably has implications on the chemistry and the observed line emission . We also find that hydrostatic Jupiter-mass cores with radii less than 100 AU would have very high boundary pressures compared with typical pressures in the interstellar space .