With the explosive growth of mobile traffic demand, device-to-device (D2D) communication offers a promising approach to reduce cellular congestion by offloading users' traffic to D2D network. In this paper, we consider a relay- assisted D2D communication in underlay cellular networks, where D2D users access a proportion of the spectrum occupied by cellular users. This poses two fundamental issues. The first issue is related to protecting the cellular transmissions by reducing the spectrum partition factor, which measures the fraction of spectrum available to D2D users. The second issue is that as we limit the spectrum available to D2D users, less D2D transmissions can be supported, which in turn increases the distances between them. To address these issues, we allow a relay user to assist D2D communications in order to achieve higher D2D spectral efficiency without affecting cellular spectral efficiency. In fact, results show significant improvements in spectral efficiency not only to D2D, but to the whole network, especially in a dense D2D environment.