Extensible local isomorphisms theorem

Statement
Suppose $$G$$ is a group. Suppose we have an isomorphism $$\sigma$$ between two subgroups $$A$$ and $$B$$ of $$G$$, such that, whenever $$K$$ is a group containing $$G$$, $$\sigma$$ can be extended to an automorphism of $$K$$.

Then, $$\sigma$$ extends to an inner automorphism of $$G$$.