In the present work we have studied the influence of phosphorus impurities on the grain boundary strength of tungsten by means of quantum mechanical calculations based on density functional theory. As model grain boundary we consider the Σ5(310)[001] high angle configuration. The results show that by the introduction of a clean (i.e. impurity free) grain boundary in the bulk, the strength and peak stress of the cohesive zone are reduced and they are further reduced by the introduction of impurities. This effect can be attributed to the formation of polar bonds between W and P, which leads to a weakening of the interface. Based on a thermodynamic analysis of the cohesive zone during the straining we find that diffusion of impurities may occur to retain thermodynamic equilibrium for constant chemical potential. This contributes to the gradual reduction of the peak stress related to fracture, which can contribute to diffusion driven delayed cracking, even when subjected to static loads.