As a critical infrastructure element, smart grid is facing security and reliability challenges. In this paper, we have investigated the real-time communication between a smart meter and the central control system, a component that provides centralized monitoring and performs control operations for the power grid. To combat severe communication impairments induced by malicious attacks or link failures, we propose to implement space–time block coding over multiple antennas at the transmitter and the receiver. We first investigated the security challenges from malicious attacks, in which the malicious attacks of additive pattern were primarily addressed. Reliability challenges from link failure were then considered. Finally present were extensive numerical studies on multiple-link attacks, multiple-link failures and receiver with detection scenarios. Simulations showed that additive malicious attacks and link failures could be effectively mitigated in virtue of space–time block coding. Meanwhile, it is verified that more antennas will give more diversity gain and better performance. Copyright © 2012 John Wiley & Sons, Ltd.