A method implemented in a wireless device for selecting resources for a two-step random access, RA, procedure, the method comprising: receiving (S138) a two-step RA configuration for a cell from a network node , the two-step RA configuration comprising: a first resource allocation for a physical uplink shared channel, PUSCH, transmission of a first message, msgA, of the two-step RA procedure, the first resource allocation for the PUSCH transmission of the msgA being associated with a first set of preambles; and a second resource allocation for the PUSCH transmission of the msgA associated with a second set of preambles; selecting (S140) one of the first and second resource allocation and the associated one of the first and second set of preambles based on the two-step RA configuration and a payload size of the PUSCH transmission of the msgA; and transmitting (S142) the PUSCH transmission of the msgA using the selected one of the first and second resource allocation, wherein selecting one of the first and second resource allocation and associated one of the first and second set of preambles comprises: comparing the payload size of the PUSCH transmission of the msgA with a size threshold value associated with the first and second resource allocations of the two-step RA configuration; comparing an estimated downlink pathloss with a pathloss threshold value associated with the second set of preambles; selecting the second resource allocation and associated second set of preambles when the payload size is greater than the size threshold value and the estimated downlink pathloss is less than the pathloss threshold value; and selecting the first resource allocation and associated first set of preambles otherwise. receiving (S138) a two-step RA configuration for a cell from a network node , the two-step RA configuration comprising: a first resource allocation for a physical uplink shared channel, PUSCH, transmission of a first message, msgA, of the two-step RA procedure, the first resource allocation for the PUSCH transmission of the msgA being associated with a first set of preambles; and a second resource allocation for the PUSCH transmission of the msgA associated with a second set of preambles; selecting (S140) one of the first and second resource allocation and the associated one of the first and second set of preambles based on the two-step RA configuration and a payload size of the PUSCH transmission of the msgA; and transmitting (S142) the PUSCH transmission of the msgA using the selected one of the first and second resource allocation, wherein selecting one of the first and second resource allocation and associated one of the first and second set of preambles comprises: comparing the payload size of the PUSCH transmission of the msgA with a size threshold value associated with the first and second resource allocations of the two-step RA configuration; comparing an estimated downlink pathloss with a pathloss threshold value associated with the second set of preambles; selecting the second resource allocation and associated second set of preambles when the payload size is greater than the size threshold value and the estimated downlink pathloss is less than the pathloss threshold value; and selecting the first resource allocation and associated first set of preambles otherwise. comparing the payload size of the PUSCH transmission of the msgA with a size threshold value associated with the first and second resource allocations of the two-step RA configuration; comparing an estimated downlink pathloss with a pathloss threshold value associated with the second set of preambles; selecting the second resource allocation and associated second set of preambles when the payload size is greater than the size threshold value and the estimated downlink pathloss is less than the pathloss threshold value; and selecting the first resource allocation and associated first set of preambles otherwise. <EOS>