A Lebanese citizen confessed under judicial interrogation Monday to planting one of the bombs used in last year's abortive attempt to blow up two German trains, a judicial official said. The suspect, Jihad Hamad, told an investigating magistrate that he was trying to avenge the publication of cartoons of the Prophet Muhammad, the official said, speaking on condition of anonymity because he was not authorized to speak to the press. Lebanon arrested Hamad and three other suspects on charges of planting crude bombs on two trains at Cologne station on July 31. German surveillance cameras are said to have filmed the suspects as they pulled wheeled suitcases in the station. The bombs were found later that day on trains at Koblenz and Dortmund stations. Their detonators went off but failed to ignite the explosives.