American International Group has agreed to settle all legal disputes with its former chairman Maurice “Hank” Greenberg.

The insurance company, which was bailed out by the government and is now owned by U.S. taxpayers, also resolved its complaints against former chief financial officer Howard I. Smith. AIG said it will pay up to $150 million in past legal fees and expenses for both Greenberg and Smith. The agreement calls for the reimbursements to be reviewed by a third party.

Under the terms of the agreement, AIG will also return a Persian rug from the company's headquarters to Greenberg, as well as photographs of Greenberg with Chinese leaders in AIG's Shanghai building. Greenberg will also have access to AIG's archives to write his memoirs.

AIG had argued that a Greenberg-controlled investment firm owed it $4.3 billion to cover stock taken from an executive retirement fund. AIG claimed the fund was held in an oral trust for use by company employees. Greenberg argued he could sell the shares because they were controlled by his firm, Starr International.

AIG had also claimed that Greenberg and Smith owe part of the $1.6 billion the insurer paid to settle a range of issues with regulators including the U.S. Securities and Exchange Commission, Justice Department and New York Attorney General.

Mark Herr, an AIG spokesman, said the legal costs AIG reimburses Greenberg and Smith may be covered at least partially by insurance.