We consider an M/G/1 retrial queue with general retrial times where the blocked customers either with probability q join the infinite waiting room (called priority queue) or with complementary probability p leave the service area and enter the retrial group (called orbit) in accordance with an FCFS discipline. We assume that only the customer at the head of the orbit is allowed to retry for service. We study the ergodicity of the embedded Markov chain, its stationary distribution function and the joint generating function of the number of customers in both groups in the steady-state regime. Moreover, we obtain the generating function of the system size distribution, which generalizes the well-known Pollaczek–Khinchin formula. Also we obtain the stochastic decomposition law and as an application we study the asymptotic behaviour under high rate of retrials. Besides the optimal control of the priority policy is investigated. The results agree with known special cases. Finally, numerical calculations are used to observe system performance.