Network motifs are small building blocks of complex networks. Statistically significant motifs often perform network-specific functions. However, the precise nature of the connection between motifs and the global structure and function of networks remains elusive. Here we show that the global structure of some real networks is statistically determined by the probability of connections within motifs of size at most 3, once this probability accounts for node degrees. The connectivity profiles of node triples in these networks capture all their local and global properties. This finding impacts methods relying on motif statistical significance, and enriches our understanding of the elementary forces that shape the structure of complex networks.