A method performed by a base station of a cellular radio system, the method comprising: obtaining (S310) at least one access control parameter for a device-to-device, D2D, based access, wherein said obtaining (S310) comprises: monitoring (S311) a load level of resources allocated for D2D communications; and determining (S314) said at least one access control parameter based at least partly on the load level, and the method further comprising: adjusting (S312) the resources allocated for the D2D communications based on the load level; and monitoring (S313) the load level of the adjusted resources allocated the D2D communications; and transmitting (S320) a message including said at least one access control parameter to one or more terminal devices for initiating the D2D based access, wherein the at least one access control parameter determines whether the D2D based access of a first type or a second type is allowed or barred by said one or more terminal devices, wherein said initiating the D2D based access comprises: initiating the D2D based access of the second type in response to determining that the D2D based access of the first type is barred; and wherein the D2D based access of the first type is one of a D2D contention based access and a D2D contention free access, and the D2D based access of the second type is the other of the D2D contention based access and the D2D contention free access. obtaining (S310) at least one access control parameter for a device-to-device, D2D, based access, wherein said obtaining (S310) comprises: monitoring (S311) a load level of resources allocated for D2D communications; and determining (S314) said at least one access control parameter based at least partly on the load level, and the method further comprising: adjusting (S312) the resources allocated for the D2D communications based on the load level; and monitoring (S313) the load level of the adjusted resources allocated the D2D communications; and monitoring (S311) a load level of resources allocated for D2D communications; and determining (S314) said at least one access control parameter based at least partly on the load level, and the method further comprising: adjusting (S312) the resources allocated for the D2D communications based on the load level; and monitoring (S313) the load level of the adjusted resources allocated the D2D communications; and adjusting (S312) the resources allocated for the D2D communications based on the load level; and monitoring (S313) the load level of the adjusted resources allocated the D2D communications; and transmitting (S320) a message including said at least one access control parameter to one or more terminal devices for initiating the D2D based access, wherein the at least one access control parameter determines whether the D2D based access of a first type or a second type is allowed or barred by said one or more terminal devices, wherein said initiating the D2D based access comprises: initiating the D2D based access of the second type in response to determining that the D2D based access of the first type is barred; and wherein the D2D based access of the first type is one of a D2D contention based access and a D2D contention free access, and the D2D based access of the second type is the other of the D2D contention based access and the D2D contention free access. <EOS>