A Nigerian man said Wednesday he tried to bring down an international flight over Detroit with a bomb in his underwear in retaliation for the killing of Muslims worldwide, taking a federal court by surprise as he pleaded guilty on the second day of his trial.