The amnesty was introduced by Pervez Musharraf when he was president as part of a power-sharing deal brokered with Benazir Bhutto , Mr Zardari 's late wife and former prime minister , with US and British encouragement .