This paper investigates a unified random access process for a narrowband Internet-of-Things (NB-IoT) protocol without global navigation satellite system (GNSS) connectivity seamlessly operating between nonterrestrial networks and terrestrial networks. For high accuracy and backward compatibility, the common Doppler shift is employed for pre-and postcompensations at a narrowband physical random access channel (NPRACH) receiver; meanwhile, a common propagation delay is employed for pre-time advance (pre-TA) and random access opportunity (RAO) postponement at the NPRACH receiver on the satellite. Derivations of joint maximum likelihood estimation (JMLE) result in a bank of matched filters (MFs), whose outputs are employed to test for the presence of user equipment (UE). The squared magnitudes of the symbol-level matched filter (SLMF) outputs are coherently accumulated to improve the signal-tointerference-plus-noise ratio (SINR) performance of the proposed NPRACH detector instead of the conventional extension of the length of the MF impulse response (IR). The residual Doppler frequency and excess timing delay are detected at half of the subcarrier spacing and half of the symbol duration, respectively, via a grid search. The false alarm and miss probabilities are derived in the presence of a high Doppler frequency, long differential delay, random initial phase errors and different channel gains through which the preambles of multiple UEs propagate. Computer simulations confirm the theoretical analyses and show that the proposed technique performs effective random access tasks with low miss probabilities.