Cunningham was elected as a Republican to the seventh district vacancy in a special election when U.S. Representative Brock Adams resigned to become Secretary of Transportation. However his victory in this extremely liberal district was more the result of confusion with Adams resignation. Cunningham lost reelection in 1978, and served from May 17, 1977 – January 3, 1979.