MISSOULA, Mont. — Greg Mortenson, the author of “Three Cups of Tea,” has agreed to pay $1 million to compensate his Montana-based charity for using the group to promote and buy copies of his books, a report from the state attorney general said on Thursday.

The settlement between Mr. Mortenson; leaders of the charity he founded, called the Central Asia Institute; and Montana officials allows the charity to continue providing education to impoverished communities in Pakistan and Afghanistan.

The office of the Montana attorney general, Steve Bullock, said its investigation, begun in April 2011 after a “60 Minutes” report, found the Central Asia Institute had spent nearly $4 million since 2006 to buy copies of Mr. Mortenson’s books, “Three Cups of Tea” and “Stones Into Schools.”

Buying those books generated royalties for Mr. Mortenson, and although he had agreed to provide a contribution to the Central Asia Institute equal to the amount of royalty payments he received from book sales, he had not done so as of April 2011, the attorney general’s report found.