Any participant who is at least 50 years of age and has 20 years of creditable service, including at least 5 years of service credit toward retirement under the System (excluding military and naval service), may on his or her own application and with the consent of the Secretary be retired from the Service and receive retirement benefits in accordance with section
of this title. The Secretary shall withhold consent for retirement under this section by any participant who has not been a member of the Service for 5 years. Any participant who voluntarily separates from the Service before completing 5 years in the System and who, on the date of separation, would be eligible for an annuity, based on a voluntary separation, under section
, if the participant had been covered under the Civil Service Retirement System rather than subject to this subchapter while a member of the Service, may receive an annuity under section
8338, notwithstanding section
, if all contributions transferred to the Fund under section
of this title, as well as all contributions withheld from the participant’s pay or contributed by the employer, and deposited into the Fund during the period he or she was subject to this subchapter, including interest on these amounts, are transferred to the Civil Service Retirement and Disability Fund effective on the date the participant separates from the Service.