The inherent broadcast characteristics of wireless medium make wireless data transmission difficult to be shielded from unintended recipients. As such, secure communication over wireless channels becomes a critical issue in the design of wireless networks. In this study, the authors study cooperative jamming and power optimisation in untrusted relay networks to improve physical layer security. By exploiting the direct link, a source-based jamming (SBJ) scheme is proposed to hinder the untrusted relay from intercepting the confidential message. Considering the total power budget, a power allocation strategy is also proposed to optimally determine the power of source and untrusted relay as well as the power of information and jamming signals. Furthermore, to evaluate the secrecy performance of the proposed SBJ scheme with the power allocation strategy, tight lower bound of ergodic secrecy capacity and asymptotic secrecy outage probability are derived in closed form. Simulation verifies the advantages of the proposed SBJ scheme and the power allocation strategy.