A user equipment, comprising: a wireless interface configured for communication with a cellular communication network; and a processing device configured to control the wireless interface to use device-to-device resources (50, 53) for device-to-device discovery and/or device-to-device communication, wherein the user equipment is configured to determine whether the user equipment moves out of coverage or is out of coverage of the cellular communication network, characterized in that the user equipment is further configured to use a pre-configured resource for device-to-device discovery and/or device-to-device communication if the user equipment is in coverage of the cellular network, receive, from a group head of a device-to-device group which comprises the user equipment, a message which enables a use of an extension resource for device-to-device discovery and/or device-to-device communication if all devices of the device-to-device group are out of coverage or move out of coverage, use the pre-configured resource and additionally the extension resource for device-to-device discovery and/or device-to-device communication if the user equipment is out of coverage and if all devices (2, 3, 4) of the device-to-device group which comprises the user equipment move out of coverage of the cellular communication network or are out of coverage of the cellular communication network, wherein the use of the extension resource is performed selectively depending on a signal-to-noise-plus-interference-ratio, SINR, measured by all devices of the device-to-device group, wherein the extension resource is used only if the SINR for each device is less than a threshold, wherein the threshold is less than a further threshold for the SINR which determines whether the devices are in cover-age. a wireless interface configured for communication with a cellular communication network; and a processing device configured to control the wireless interface to use device-to-device resources (50, 53) for device-to-device discovery and/or device-to-device communication, wherein the user equipment is configured to determine whether the user equipment moves out of coverage or is out of coverage of the cellular communication network, characterized in that the user equipment is further configured to use a pre-configured resource for device-to-device discovery and/or device-to-device communication if the user equipment is in coverage of the cellular network, receive, from a group head of a device-to-device group which comprises the user equipment, a message which enables a use of an extension resource for device-to-device discovery and/or device-to-device communication if all devices of the device-to-device group are out of coverage or move out of coverage, use the pre-configured resource and additionally the extension resource for device-to-device discovery and/or device-to-device communication if the user equipment is out of coverage and if all devices (2, 3, 4) of the device-to-device group which comprises the user equipment move out of coverage of the cellular communication network or are out of coverage of the cellular communication network, wherein the use of the extension resource is performed selectively depending on a signal-to-noise-plus-interference-ratio, SINR, measured by all devices of the device-to-device group, wherein the extension resource is used only if the SINR for each device is less than a threshold, wherein the threshold is less than a further threshold for the SINR which determines whether the devices are in cover-age.