McCloskey, who was endorsed by the End Poverty in California organization, ran second in an election to replace Municipal Judge Marchetti, Office No. 10, in the primary election of April 1935 but was challenged by the next runner-up, Lyndon Bowring, because McCloskey had not been a California lawyer for the required five years, as required by the state constitution. McCloskey argued that he would have been eligible, if elected, on the day of taking office, July 1, but the Supreme Court of California disagreed and ordered McCloskey off the final ballot in June and Bowring to take his place.