A German arrested in Pakistan on suspicion of planning to attend a militant Islamist training camp has been released, the German foreign ministry said on Tuesday.