Context : Observations of secondary eclipses of hot Jupiters allow one to measure the dayside thermal emission from the planets ’ atmospheres . The combination of ground-based near-infrared observations and space-based observations at longer wavelengths constrains the atmospheric temperature structure and chemical composition . Aims : This work aims at detecting the thermal emission of WASP-5b , a highly irradiated dense hot Jupiter orbiting a G4V star every 1.6 days , in the J , H and K near-infrared photometric bands . The spectral energy distribution is used to constrain the temperature-pressure profile and to study the energy budget of WASP-5b . Methods : We observed two secondary-eclipse events of WASP-5b in the J , H , K bands simultaneously using the GROND instrument on the MPG/ESO 2.2 meter telescope . The telescope was in nodding mode for the first observation and in staring mode for the second observation . The occultation light curves were modeled to obtain the flux ratios in each band , which were then compared with atmospheric models . Results : Thermal emission of WASP-5b is detected in the J and K bands in staring mode . The retrieved planet-to-star flux ratios are 0.168 ^ { +0.050 } _ { -0.052 } % in the J band and 0.269 \pm 0.062 % in the K band , corresponding to brightness temperatures of 2996 ^ { +212 } _ { -261 } K and 2890 ^ { +246 } _ { -269 } K , respectively . No thermal emission is detected in the H band , with a 3- \sigma upper limit of 0.166 % on the planet-to-star flux ratio , corresponding to a maximum temperature of 2779 K. On the whole , our J , H , K results can be explained by a roughly isothermal temperature profile of \sim 2700 K in the deep layers of the planetary dayside atmosphere that are probed at these wavelengths . Together with Spitzer observations , which probe higher layers that are found to be at \sim 1900 K , a temperature inversion is ruled out in the range of pressures probed by the combined data set . While an oxygen-rich model is unable to explain all the data , a carbon-rich model provides a reasonable fit but violates energy balance . The nodding-mode observation was not used for the analysis because of unremovable systematics . Our experience reconfirms that of previous authors : staring-mode observations are better suited for exoplanet observations than nodding-mode observations . Conclusions :