NEW YORK -- A New York City minister who was the subject of an Associated Press investigation about misspent 9/11 and Hurricane Katrina charity funds has agreed to repay $1.2 million that he took from his congregation to buy an 18th-century farmhouse on seven acres in rural New Jersey.

The Rev. Carl Keyes and his wife, the Rev. Donna Keyes, who jointly led the Glad Tidings Tabernacle in Manhattan, signed a legal judgment Wednesday settling a probe by the New York attorney general into a series of questionable church financial transactions.

Those deals included an illegal loan the couple took from the church in 2008 to buy a house in Stockton, New Jersey, near the Delaware River, and $500,000 the church loaned to an anti-poverty charity controlled by Carl Keyes, called Aid for the World.

Get Breaking News Delivered to Your Inbox

Some of that money, the attorney general's office said, was used to buy the minister and his wife a BMW. According to the settlement, which was scheduled to be officially announced Thursday, other funds were used to finance family trips to California, West Virginia, Africa and Florida, where the couple's sons went to college.

Glad Tidings former executive director, Mark Costantin, agreed to repay $482,000 he still owed Glad Tidings on $1.2 million in loans he'd taken from the church, some of which were used to pay off the mortgage on his house in Chester, New York.

"Carl and Donna Keyes and Mark Costantin abused the trust of their congregants and used Glad Tidings Tabernacle as their personal bank," said Attorney General Eric Schneiderman. He said the law forbids officers and directors, including ministers, from taking any such loans - "much less loans to finance personal expenses and lifestyle choices."

Three former members of the Glad Tidings' board agreed to pay $50,000 in penalties for neglecting their oversight duties.

The attorney general's office began its investigation after the AP raised numerous questions about Carl Keyes and two charities he controlled, including one that had received $4.8 million in donations intended to help victims of the 9/11 terrorist attacks and Hurricane Katrina.

The AP reported in articles in 2011 and 2012 that Keyes had diverted some of that money into his cash-starved church, then used funds from the church and the nonprofit groups to cover hundreds of thousands of dollars in personal credit card bills and other debts. Keyes used one big donation, meant for his disaster-relief charity, Urban Life Ministries, to clear a mortgage on another New Jersey home.

The AP also found that Keyes had embellished stories about relief work he performed in New York in the months after the 9/11 attacks. In some cases, he took credit for things that other people had done.

Using a combination of internal documents and public records, the AP also chronicled how the church disposed of $31 million it made by selling off its historic Manhattan church in 2007. That report included detail on some of the loan transactions that were the subject of Wednesday's settlement. After the AP began asking questions, Keyes filed eight years of tax returns for Urban Life Ministries and three years for Aid for the World.

State investigators said Costantin helped arrange for the church to lend nearly $1 million to the Keyes couple for their farmhouse purchase. The investigators added that Costantin signed paperwork in which the church gave up its right to claim ownership of the property if the loan wasn't repaid. No payments were made, the state said, and when the Keyes sold the house last year, they kept all the proceeds.

A similar arrangement, approved by Keyes, took away the church's ability to collect on the loans to Costantin, the state said.

New York law bars the officers and directors of nonprofit and religious organizations from taking any loans from their organizations.

As a result of the legal settlement, Glad Tidings Tabernacle, now located in Harlem, has been placed under the temporary stewardship of a board appointed by an Assemblies of God umbrella organization.

New York Assemblies of God District Superintendent Dr. Duane Durst said the organization planned to examine the church's finances carefully.

The legal judgment requires the Keyes to pay $1,231,105 in restitution to Glad Tidings, which includes borrowed money plus interest.

The Keyes couple and Costantin have been permanently barred from acting as fiduciaries of any New York nonprofit or religious corporation. The agreement allows Donna Keyes to continue to serve as senior pastor at Glad Tidings.

The attorney who represented the ministers and Costantin, Maurice Heller, declined to comment. He said the settlement doesn't require his clients to admit guilt, but forbids them from making public statements contesting the allegations.