In heavy oil recovery by gas injection, adverse mobility ratio and gravity segregation are the most crucial factors that control the efficiency of the displacement. Moreover, in injection scenarios involving CO2, significant mass transfer takes place between fluids resulting in a considerable change in their physical properties. Obtaining relative permeability functions, which is an important flow function in simulation, under these circumstances, and by using conventional techniques that are based on stable displacement front, could be highly misleading. In this work, a methodology for estimating relative permeability curves under unstable flow conditions and mass transfer using history-matching technique was proposed. A consistent set of coreflood experiments, involving CO2, and N2 injection scenarios in horizontal and vertical orientations were considered for the estimation. A systematic oil component lumping scheme, which is based on the GC compositional analysis of produced oil from a CO2 injection experiment, was employed. The results obtained from the simulation, showed that the lumping scheme adequately captured the dynamic behaviour observed in the experiments. This would not have been attained through conventional lumping techniques. For the history matching, an optimum, high resolution, two-dimensional core model was used, as opposed to the industry standard use of one-dimensional model, for the simulations. The unknown relative permeability functions to be history matched were represented by a versatile parametric correlation to honour the S-behaviour of the gas relative permeability curve. The results of the simulation were then verified using two approaches; firstly, a semi-empirical approach, where a Koval empirical parameter was verified by back-calculation in an inverse process, and the saturation distribution, which has the greatest impact on the shape of the relative permeabilities was satisfactorily verified through a combination of theoretical and empirical prediction. In the second approach, a gas-oil relative permeability obtained from an injection of CO2 into a horizontal core saturated with heavy oil was used to simulate a similar experiment but in a vertical orientation. A good match was obtained between the simulation and the experiment, indicating the accuracy and the independence of the estimation method from orientational effects. To highlight the effect of mass transfer on the shape of relative permeabilities, the simulation results from two gas injection corefloods were compared; CO2 injection with mass transfer, N2 injection without mass transfer. The results showed that the two estimated functions were quite similar, indicating that the magnitude of instability rather than mass transfer has a significant effect on the shape of the functions. This integrated approach, therefore, highlights the importance of employing the right fluid model and an appropriate 2D-grid model in estimating relative permeabilities in displacement with instability and mass transfer against the current industry practice.