Let A and B be complex unital Banach algebras, and let φ,ψ:A→B be surjective mappings. If A is semisimple with an essential socle and φ and ψ together preserve the invertibility of linear pencils in both directions, that is, for any x,y∈A and λ∈C, λx+y is invertible in A if and only if λφ(x)+ψ(y) is invertible in B, then we show that there exists an invertible element u in B and a Jordan isomorphism J:A→B such that φ(x)=ψ(x)=uJ(x) for all x∈A.