Mark Wilson/Getty Images

“Some people just don’t like movies with happy endings.”

That’s what the White House said about Neil Barofsky, then the special inspector general for the Troubled Asset Relief Program, when he complained two years ago that the Treasury Department was fudging its math about its investment in the American International Group.

At the time, the Treasury Department said that it was likely to lose only about $5 billion on the bailout. Mr. Barofsky declared that the number was “manipulated” as part of a “publicity campaign touting the positive aspects of TARP” ahead of the midterm elections.

Fast forward to this week. The Treasury Department announced it planned to sell $18 billion of its A.I.G. stake, putting it on a path to actually turn a profit. It was a remarkable feat and one that nobody — including Treasury Secretary Timothy F. Geithner — anticipated four years ago at the peak of the crisis during the $180 billion bailout of the company.

Critics of the A.I.G. bailout — it was the most loathed of the rescues and a centerpiece of the Occupy Wall Street movement — had insisted it was going to be a huge black hole.

Given the latest news, I called Mr. Barofsky to see if he had any regrets about his earlier pronouncements now that the rescue of A.I.G. appeared profitable.

“Whoa! Whoa! Whoa! They are not making money!” Mr. Barofsky, now a senior fellow at New York University School of Law, said when I reached him. “They are on the path to very significant losses!”

What?

Mr. Barofsky, who recently wrote a scathing book about the Treasury Department called “Bailout,” refused to admit defeat, saying, “I was right then and I am right now.”

He said that the government is “really engaged in half-truths and creative accounting.” After that assertion, he quickly followed up with, “Is the timing keyed to the election?”

Mr. Barofsky continues to claim the Treasury Department is playing fast and loose with how it calculates profitability. The Treasury says its break-even cost for A.I.G. shares is $28.73, so that any sale of shares at a higher price — the government is selling its A.I.G. shares for $32.50 — means it stands to make a profit.

Mr. Barofsky says that calculation is “absurd.” He says the real break-even price for TARP is $43.53 a share. But Mr. Barofsky — and other critics of the bailout that have sought to portray the rescue effort as a money-losing failure — may be engaged in half-truths and creative accounting of their own.

Mr. Barofsky is focusing on how much the government paid through the TARP program for A.I.G. shares, not how much the taxpayer will ultimately make — including through a separate investment made by the Federal Reserve.

Mr. Barofsky is technically correct that if you isolate the original cost to TARP for its investment in A.I.G., $43.53 a share is the break-even number.

But that conveniently excludes the huge stake that the Federal Reserve received in exchange for its original $85 billion rescue in September 2008. The Federal Reserve’s stake was later rolled into the Treasury’s stake through a series of complicated transactions.

If you include the TARP stake and the Federal Reserve stake, the break-even sale price for A.I.G. shares is the $28.73 that the Treasury has proclaimed.

And that’s the number that taxpayers should care about.

Mr. Barofsky, however, told me that “it’s just not accurate” for me or anyone else to accept Treasury’s view of profitability because “they mixed the pot.”

He explained: “The Fed’s cost basis is zero and they essentially gifted the shares to Treasury,” adding that the government should disclose its math. “It’s a question of transparency.”

When Mr. Barofsky first raised this issue in 2010, the White House, in a rare rebuke of an inspector general, said he had “sought to generate a false controversy over A.I.G. to try and grab a few, cheap headlines.”

As we approach the four-year anniversary of the collapse of Lehman Brothers and the rescue of A.I.G. next week, sadly, much of the public — and people like Mr. Barofsky, as well-intentioned as he is — are still criticizing and debating the merits of the bailout. It’s almost become a cottage industry.

In his book, Mr. Barofsky wrote, “Treasury’s desperate attempt to bail out Wall Street was setting the country up for potentially catastrophic losses.”

As distasteful as the rescue effort was, it should be clear by now that without it, we faced an economic Armageddon. And the results thus far of bailing out the big banks, and A.I.G., indicate a profit.

The Government Accountability Office, which is not swayed by politics, estimated in May that taxpayers will receive a profit of about $15 billion from the A.I.G. bailout. That includes the profit the Fed had already made as part of the broader rescue. There may still be parts of the bailouts to debate: how they were executed, whether they were as effective as they could have been and, perhaps, whether taxpayers should have received an even bigger return for their investments given the risk.

But on the whole, the rescue of A.I.G. — often called a backdoor bailout of Wall Street — should be considered a success.

Toward the end of my phone call, Mr. Barofsky said it himself: “The government had no choice but to bail out A.I.G.” Then he added that Treasury’s sale of A.I.G. stock “is unambiguously good news for the country.”