The authors propose an optimal joint power control and multi-band spectrum sensing scheme for cognitive radio (CR) systems to increase the spectral efficiency and to overcome the spectrum-sensing errors, in the presence of primary user emulation attacker (PUEA). This optimisation problem is solved to maximise the opportunistic CR data rate under interference and power budget constraints. To solve the formulated optimisation problem, they convert it to a convex problem, and then derive an optimal strategy for joint power control and spectrum access in the considered CR system. They show that the optimal strategy follows a quasi-underlay signaling, which is equipped with spectrum sensing. They evaluate the performance of the optimised scheme for the CR system in the presence of PUEA, and compare it with the conventional underlay scheme. For more comparison, they compare the proposed approach to that of a similar system, which does not consider the PUEA in the formulation of the joint spectrum sensing and power allocation. They show that the proposed optimal joint power control and spectrum sensing can significantly improve the system performance in terms of average achievable CR data rates compared with the considered conventional methods.