Yes, Pope Benedict III's election was contested. He was elected in 855 AD, but a rival claimant, Anastasius Bibliothecarius, was also elected. The dispute was eventually resolved in Benedict's favor, but it caused a great deal of turmoil in the church.
The Papal Puzzle: Uncovering Pope Benedict III's Legacy