the 10th Legislative District (consisting of the entirety of Morris County) to fill the remaining term of Joseph J. Maraziti, who had been elected to the United States House of Representatives in the previous year. The other election was for a four-year term in the newly formed 23rd Legislative District (consisting of central Morris County municipalities). In both elections, he faced Republican Assemblywoman Josephine Margetts. Wiley defeated Margetts in both elections (by two points in the special election and by six in the regular election), becoming the first Democrat to win a State Senate seat from Morris County in sixty years. Wiley was sworn into the Senate on November 12, 1973, serving two months of Maraziti's unexpired term from the at-large Morris County district. Later, in his full Senate term, Wiley served as Chair of the Senate Education Committee, the Joint Committee on the Public Schools and the Senate Rules Committee. Wiley was responsible for drafting legislation which became the Public School Education Act of 1975, which established a state income tax in New Jersey that was specified as a source for school funding in addition to locally assessed property taxes. He was named a top legislator by New Jersey Monthly magazine. Governor Brendan Byrne nominated Wiley to the New Jersey Supreme Court in 1975 following the retirement of Justice Frederick W. Hall. His nomination was approved by the Senate, but was challenged by former Assemblyman David Friedland on the grounds that the State Legislature had voted to raise the salary of justices of the Supreme Court during Wiley's Senate tenure. On February 11, 1977, after two years of appeals, the New Jersey Supreme Court rejected Wiley's nomination because of the pay raise, ruling that Wiley could not be appointed to serve on the Court until after his term of office expired. According to The New York Times, the Constitution of the State of New Jersey provides that "no legislator may be appointed to a state job until after his term expires if the salary for the job was raised during the term." Alan B. Handler was later appointed and confirmed to fill the vacancy on the Court. Wiley was defeated by Assemblyman John H. Dorsey, 54%-46%, in his 1977 re-election bid. Wiley ran for the Democratic gubernatorial nomination in 1985, focusing on the state's toxic waste problem as a campaign issue as he targeted incumbent Republican Governor Tom Kean.