Afghan officials say attack on ministry was repelled