Summary Borehole geophysical measurements acquired in gas-bearing formations can be significantly influenced by oil-base mud (OBM) invasion. Fluid substitution of density and sonic logs in OBM-invaded gas-bearing formations is necessary but difficult because resistivity logs cannot differentiate the saturations of OBM filtrate and gas. Numerical simulations indicate that invasion of OBM filtrate into gas-bearing formations is typically shallower than 30 cm and exhibits a sharp saturation front. The radial invasion profile is largely controlled by the rock’s petrophysical properties under relatively stable drilling conditions. On the other hand, density and neutron logs are mainly sensitive to invasion shallower than 18 cm while slowness/velocity processed from sonic waveforms is only affected by invasion deeper than 18 cm. Therefore, accurate fluid substitution in OBM invaded gas-bearing formations requires pre-assessment of the radial invasion profile which is governed by pore geometry, i.e., petrophysical rock type. We introduce a new method to address this technical challenge by integrating fast numerical simulation of well logs under mud-filtrate invasion and well-log based petrophysical rock classification. A field example from Trinidad onshore deltaic gas reservoirs is used to validate the proposed method.