The idea of space-time coding devised for multiple-antenna systems is applied to the problem of communication over a wireless relay network, a strategy called distributed space-time coding, to achieve the cooperative diversity provided by antennas of the relay nodes. In this paper, we extend the idea of distributed space-time coding to wireless relay networks with multiple-antenna nodes and fading channels. We show that for a wireless relay network with M antennas at the transmit node, N antennas at the receive node, and a total of R antennas at all the relay nodes, provided that the coherence interval is long enough, the high SNR pairwise error probability (PEP) behaves as (1/P)(min{M, N}R) if M not equal N and (log(1/M) P/P)(MR) if M = N, where P is the total power consumed by the network. Therefore, for the case of M not equal N, distributed space-time coding achieves the maximal diversity. For the case of M = N, the penalty is a factor of log(1/M) P which, compared to P, becomes negligible when P is very high. Copyright (c) 2008.