Today , many extrasolar planets have been detected . Some of them exhibit properties quite different from the planets in our solar system and they have eluded attempts to explain their formation . One such case is HD 149026 b . It was discovered by . A transit-determined orbital inclination results in a total mass of 114 \mathrm { M _ { \earth } } . The unusually small radius can be explained by a condensible element core with an inferred mass of 67 \mathrm { M _ { \earth } } for the best fitting theoretical model . In the core accretion model , giant planets are assumed to form around a growing core of condensible materials . With increasing core mass , the amount of gravitationally bound envelope mass increases . This continues up to the so-called critical core mass – the largest core allowing a hydrostatic envelope . For larger cores , the lack of static solutions forces a dynamic evolution of the protoplanet in the process accreting large amounts of gas or ejecting the envelope . This would prevent the formation of HD 149026 b . By studying all possible hydrostatic equilibria we could show that HD 149026 b can remain hydrostatic up to the inferred heavy core . This is possible if it is formed in-situ in a relatively low-pressure nebula . This formation process is confirmed by fluid-dynamic calculations using the environmental conditions as determined by the hydrostatic models . We present a quantitative in-situ formation scenario for the massive core planet HD 149026 b . Furthermore we predict a wide range of possible core masses for close-in planets like HD 149026 b . This is different from migration where typical critical core masses should be expected .