When a food order came in from the Brooklyn district attorney, Ken Thompson, the officers in charge of protecting him knew the drill: Go pick it up — a bagel or a burger or, at least once, a piece of salmon — and pay out of their own pocket. Later, the district attorney’s office would reimburse them.

That bit of convenience for the elected chief prosecutor in Brooklyn went on for months after he took office in 2014, and included meals for Mr. Thompson when he worked nights and weekends.

But the routine violated New York City’s rules, and on Wednesday the city’s Conflicts of Interest Board announced that it had levied a fine of $15,000 in a settlement with Mr. Thompson. The sanction was among the largest in a decade and the first against a district attorney since the creation of the board in 1990, according to the agency’s records.

Mr. Thompson — who earns a salary of $212,800 from the city and well over that amount in payments from his former law firm, according to city disclosure reports — acknowledged in the settlement disposition spending $2,043 from the district attorney’s office to pay for his weekday meals from January through May 2014, and then an additional $1,489 in office money for dinners and weekend meals through February 2015.