The attractive and repulsive behaviours of a pair of initially spherical gas bubbles rising side-by-side in a channel with non-uniformly heated walls containing a self-rewetting liquid are investigated numerically. The surface tension of a self-rewetting fluid exhibits a parabolic temperature dependence with a well-defined minimum, as opposed to linear (common) fluids whose surface tension decreases almost linearly with the increasing temperature. It is found that, for low Reynolds numbers, while in an isothermal medium, two gas bubbles display a repulsive behaviour, they attract in non-isothermal systems. The bubbles in the self-rewetting fluid undergo a plastic collision and show a ‘squeezing and relaxing’ behaviour, whereas they attract and then bounce in the linear fluid. A regime map demarcating the repulsive and attractive behaviours for a self-rewetting fluid is plotted in the Weber number (We) and the dimensionless linear component of the surface tension gradient (M1) space. It is found that the bubbles in the self-rewetting fluid remain spherical even for high Weber numbers while they deform considerably in the case of the linear fluid indicating that the attractive behaviour of the bubbles in the self-rewetting fluid is due to the lift force generated by the thermocapillary stresses and not due to the deformation. The mechanism underlying the observed phenomenon is elucidated by studying the drag and lift forces acting on the bubbles, their orientations, and the flow field around them. © 2021 Elsevier Masson SAS