The official at the Securities and Exchange Commission who later would marry Bernard Madoff's niece told investigators this year that if he had carefully reviewed a complaint about the disgraced financier's business, he would have investigated more deeply, a new report shows.

The admission by Eric Swanson, who was an SEC attorney and inspections official during a 2003-04 exam of Madoff's operations, is among a trove of revelations in the report by SEC inspector general David Kotz.

The 477-page document, released Friday evening, paints in excruciating detail how the SEC probes of Madoff were bungled over 16 years _ with disputes among agency inspection staffers over the findings, lack of communication among SEC offices in various cities, and repeated failures to act on credible, specific complaints that formed a sea of red flags.

Among the disclosures: At one point during an agency investigation in May 2006, Madoff feared that he had been caught.

"I thought it was the end game, over," Madoff was quoted as saying when SEC investigators queried him about what account he was using to clear certain trades.

He said he felt very fortunate when there was no follow-up call to check on the account number he had given the investigators.

"After all this, I got away lucky," he told Kotz in a prison interview, though added he thought it was just a matter of time before he would eventually be caught.

Madoff, who pleaded guilty in March, is serving a 150-year sentence in federal prison in North Carolina for a Ponzi scheme that could be the biggest in U.S. history. It destroyed thousands of people's life savings, wrecked charities and gave investors' already shaken confidence in the financial system yet another big jolt.

Revelations in December of the SEC's failure to uncover Madoff's massive scheme touched off one of the most painful scandals in the agency's 75-year history.

"It is a failure that we continue to regret, and one that has led us to reform in many ways how we regulate markets and protect investors," SEC Chairman Mary Schapiro said in a statement Friday. "In the coming weeks we will continue to closely review the full report and learn every lesson we can to help build upon the many reforms we have already put into place since January."

Schapiro, appointed by President Barack Obama, took the helm in January. Enforcement efforts have been strengthened, and the agency has started a number of initiatives meant to protect investors in the wake of the financial crisis, officials say.

Kotz's investigation found no evidence that the relationship between Swanson and Madoff's niece, Shana, who married in 2007, influenced the SEC exams of Madoff.

But Swanson acknowledged in his testimony to the IG's office this year that if he had carefully examined complaints about Madoff's business, he would have dug more thoroughly, according to the report.

Swanson said a complaint from outside the SEC and financial articles on Madoff published in 2001 "mean something different to (Swanson) today than they did at the time of the (SEC) examination" in 2003-04, the report says. It quotes Swanson as saying, "I didn't know anything, very little anyway, about hedge funds and mutual funds and how they operated."

The SEC enforcement staff "almost immediately caught Madoff in lies and misrepresentations but failed to follow up on inconsistencies" and rejected whistleblowers' offers to provide additional evidence, the report says. Kotz's investigation, begun the week before Christmas last year, involved interviews with 122 people and reviews of thousands of documents.

__

AP Economics Writer Martin Crutsinger contributed to this report.

