For nearly a decade, federal prosecutors said, a former senior official at the Staten Island district attorney’s office used his agency’s American Express card to buy himself and his family more than $400,000 in luxury gifts, resort vacations and even an extensive knife collection, hiding the transactions by logging them under the internal billing code his office used to pay informants and conduct surveillance operations.

In an indictment unsealed Thursday in Federal District Court in Brooklyn, the prosecutors charged William Nelson, the former director of procurement at the district attorney’s office, with one count of theft of funds and nine counts of mail fraud. Mr. Nelson, who served in his position from 2005 until the end of 2016, was responsible for purchasing items for the district attorney’s office with official credit cards and for reconciling the bills.

According to court papers, Mr. Nelson, 44, used his office credit card to buy, among other things, a trip to Walt Disney World, toys for his children, video games, a Ferragamo quartz watch, expensive men’s dress shoes, a luxury handbag, tickets to several football games, books, groceries, survival gear and at least $100,000 in collectible knives, some of which he picked up at the 2015 Blade Show, a knife convention in Atlanta. “In even more blatant conduct,” the papers said, Mr. Nelson transferred thousands of dollars from the district attorney’s office to his own PayPal account so that he could spend it like cash.