A New York jury convicted the brother of the president of Honduras on cocaine trafficking charges on Friday, ending a trial that offered a blueprint for the way drug money penetrated the highest levels of Honduran politics to buy protection and immunity.

Since his brother’s arrest last year, a central question facing Hondurans is how President Juan Orlando Hernández could proclaim to be fighting drug traffickers while his brother was under investigation for allegedly running tons of cocaine to the United States.

Over two weeks, a parade of witnesses — including several confessed drug traffickers — offered an answer: The president looked the other way in exchange for millions of dollars for his and his party’s political campaigns.

Among those who funneled money to the president’s brother, according to one witness, was Joaquín Guzmán Loera, the Mexican drug kingpin known as El Chapo. Mr. Guzmán is serving a life sentence in a maximum security federal prison.