The second-ranking official at the Santa Margarita Water District announced his retirement Friday, two days after his superior said he was leaving his post in the midst of a criminal investigation. Michael P. Lord, who was the assistant general manager of the fast-growing water district for the last 16 years, said he had done nothing wrong but wanted "to spare the district and myself the problems that have come with the recent publicity." Lord and his boss, Walter W. (Bill) Knitz, were placed on paid administrative leave last month after The Times disclosed a decade-long history of lavish expense accounts and gift-giving from contractors. Knitz, 61, announced Wednesday that he was retiring from the district after more than 17 years. He denied wrongdoing, but said it was impossible for him to continue.