In 1954, he was elected county attorney and served in that capacity until 1958, when he became a Pima County Superior Court Judge. His national stature grew over the years, and President Lyndon B. Johnson appointed Castro as U.S. Ambassador to El Salvador in 1964. After four years there, he served as Ambassador to Bolivia until the end of 1969.