Natwar M. Gandhi, the District’s chief financial officer for the past 13 years, will retire next month. (John McDonnell/The Washington Post)

Nearly all who have encountered Natwar M. Gandhi over his long tenure as the District’s chief financial officer know he regularly carries a sheaf of pocket-size laminated charts.

They illustrate the city’s fiscal reserves and bond ratings, which have trended upward through his tenure, and are handed out with little discrimination and no small fanfare — a combination calling card and curriculum vitae.

Fewer know about another item he carries: passages from the Bhagavad-Gita, the sacred Indian text, tucked into his wallet.

“Certain stanzas to me are the essence of one’s life’s philosophy,” Gandhi said, reciting and translating one favorite passage from the original Sanskrit: “It simply says that you should not expect too much. You should be detached in your expectation. Your duty is to work, not to expect things.”

Gandhi’s work as a fiscal sage is nearly done at age 73, and he has exceeded any expectations he might have had growing up in a village in the Indian state of Gujarat. There he learned bookkeeping by the light of a kerosene lamp, launching a career that took him from college in Mumbai to graduate school in the United States and an improbable ascent through the ranks in the federal and District governments.

On Jan. 3, a new chief financial officer, Jeffrey S. DeWitt, will take over, and Gandhi — for the first time in 55 years, he says — will wake up without a full-time job.

Gandhi’s lesser-known literary life, hinted at by those Sanskrit verses, will continue.

For more than a decade, Gandhi has moonlighted as a poet, rising as early as 3 a.m. to write verse before his workday begins. Already the author of three volumes, written in his native Gujarati but often tackling themes of his adopted country and city, he has plans for a fourth. He reads widely — Harold Bloom, recently, but also Anton Chekhov and T.S. Eliot and Wallace Stevens — and is given to quoting favorite passages.

He is also an actor, though limited to a single role: his namesake, Mahatma Gandhi, whom he has played in a historical production that has been staged several times in the Washington region and is set to be performed in India next fall.

Gandhi has long styled himself a “humble bean counter” whose foremost duty is to manage and report fairly on the District’s accounts. That narrative, his critics say, is a self-serving one, meant to obscure inveterate politicking, often done over his usual breakfast table at the Old Ebbitt Grill. But it has also obscured his other identity as a man of letters and steward of Indian culture.

“I got the sense that there were two distinct sides to Nat Gandhi,” said Alice M. Rivlin, the former presidential budget director and a longtime acquaintance of Gandhi’s. “In my experience, anyway, he kept his two lives rather separate.”

His sudden decision to retire, first announced in January, came as a surprise to most. Less than six months before, he had been renominated and reconfirmed to a third term that would have kept him in office through 2017.

The year leading up to the announcement had been politically grueling, and his decision set tongues wagging — with many speculating as to whether the decision had to do with federal investigations into his office’s handling of a controversial lottery contract or whether it properly disclosed adverse audit findings.

Gandhi says his decision was made out of love, not politics.

A voyage to India last December with an old family acquaintance kindled a romance three years after Gandhi was widowed. Panna Naik, a Philadelphia poet, had been active with Gandhi in a Gujarati literary society that arranged for prominent writers to travel to the United States for readings and lectures.

The trip, Gandhi said, put matters in perspective: Would he rather deal with the slings and arrows of the John A. Wilson Building or spend his remaining days devoted to his art and new love?

“I always thought that literature, poetry, is indeed the ultimate purpose of life,” he said. “. . . Do I want to be remembered as an accountant or as a poet? And I said, no, it has to be [as a] poet.”

Much of Gandhi’s verse is written in sonnets — an unusual choice for a contemporary poet in any language, Naik said, let alone Gujarati. “Very, very few people write in this form,” she said. “Whatever he has to say, in 14 lines, he says it.”

Naik said Gandhi’s embrace of an unusually rigid poetic form and his early-rising habits reflect a discipline and resolve that has carried over into his professional life. Those characteristics, she said, are what kept him in the CFO’s job for 13 years.

It has been a remarkable run. He has had undeniable credits to his record — the unbroken string of balanced budgets, the clean audits, the raised expectations reflected on those laminated cards.

But those have been offset by considerable debits. Most prominent is the theft over nearly two decades of almost $50 million from the city treasury — a crime carried out underneath Gandhi’s nose by a mid-level tax office worker who took advantage of lax controls and a dysfunctional culture.

But Gandhi’s strong nose for politics, the trust he had built with key city and federal leaders, and his pleas to be allowed to clean up the mess kept him in the job.

Recent years, however, have seen continued critiques.

He has been at the center of a high-profile whistleblower lawsuit in which he was accused of bowing to political meddling in the lottery contract award, then firing the deputy who resisted it. Gandhi was dismissed from the suit this month, but the plaintiff, former contracts director Eric W. Payne, is seeking to have him reinstated.

The tax office he once ran, and won plaudits for modernizing, has been the locus of repeated controversies, including over its practice of settling property assessment disputes with commercial landowners and selling homeowners’ tax debts to sometimes rapacious investors. And long-planned computer systems to improve tax collections and governmental accounting have languished amid delays and contract disputes.

Gandhi said the lesson of those missteps is that even “eternal vigilance” is sometimes not enough. “In retrospect, obviously, we should have had even more attention given to the tax department,” he said, “more widespread, more comprehensive controls than we had — no doubt about that.”

“The way I look at all of this stuff, not only in the job but elsewhere in my life, is you try to do the best you can with whatever resources you have on hand,” he added. “The question I ask myself is: Have I done that? . . . The answer to that is yes, to the best of my ability. Is that enough? Obviously not, in some cases.”

Gandhi’s record, Rivlin said, is “clearly not an unblemished record, but over the long sweep I think he gets very high marks.”

Gregory McCarthy, a former top political aide to Mayor Anthony A. Williams who worked closely with Gandhi, said his success in raising the performance and expectations for a once-dismal financial apparatus may have dimmed over time.

“Balancing the budget and not having goofy audits is the normal course of business,” McCarthy said. “People don’t have the reference point as to how hard things were and the structure and discipline Nat brought to it. Balanced budgets are no big deal anymore, and there was a time when that was a big deal.”

The breakfast-table politicking might be mocked by Gandhi’s critics, McCarthy said, but it helped him do his job. “That was absolutely instrumental because at the end of the day everybody had some level of personal rapport with him,” he said. “Labor, business, developers — nobody would say they didn’t meet with him.”

Gandhi said his past helped him keep his tribulations in perspective. “No matter how difficult things are here, they are a picnic compared to what I had gone through in Mumbai,” he said — struggling to find a secure job and housing for his young family.

Now he looks forward to his poetry and extensive travel — a trip to India to portray the other Gandhi, a journey to South Africa to discover the roots of the great man’s struggle against colonial domination. Naik said they have even discussed a trip to Antarctica, tracing the explorations of Ernest Shackleton, another of Gandhi’s heroes.

He is not done with matters of finance and politics. He has accepted a policy fellowship at Georgetown University’s business school.

And Gandhi says he expects his literary output to touch on familiar matters. His last collection of poetry, titled “Pennsylvania Avenue,” dealt with social and political critiques rooted in his experiences as an immigrant.

“I’m deeply troubled by the trends we have in society today,” he said. “Look at the gridlock we have in Washington here. It really demeans us as a great power. That we cannot pay our bills? That we cannot organize ourselves to pass a budget, for heaven’s sakes?”

Naik, on the other hand, specializes in love poems.

“I do write love poems also,” Gandhi said, laughing. He declined to elaborate. “It doesn’t lend to translation.”