Harper's magazine has been saved.

As what was expected to be its last issue was about to be mailed to subscribers, the nation's oldest monthly magazine was bailed out yesterday by one of the newest -- and richest -- philanthropies in the country, the John D. and Catherine T. MacArthur Foundation of Chicago.

It bought Harper's for an undisclosed price and enlisted another foundation, established by the Atlantic Richfield Co., to share in the annual operating expenses that frightened away earlier bidders.

The magazine will continue publication without missing a beat, although the deadlines for its September issue may slip a bit. Lewis H. Lapham, Harper's editor since 1975, will continue in that position.

The sale was announced jointly yesterday by the MacArthur Foundation and the magazine's current owners, the Minneapolis Star and Tribune Co.

MacArthur Foundation president John E. Corbally and Star and Tribune Co. chairman Otto A. Silha said in a joint statement that the transaction would permit Harper's to continue "as a strong, independent voice of opinion . . . a journal for public policy statements . . . and as a literary medium."

They said they "anticipated" that the MacArthur and Atlantic Richfield foundations will create a new nonprofit organization to run the magazine.

"The new organization will be cut loose -- from everybody," added J. Roderick MacArthur, the son of the late billionaire who created the foundation several years ago. "We're out to save Harper's, not something else."

The two foundations purchased the assets and assumed the liabilities of Harper's, including a long-term subscription liability that reportedly stood at $4 million. Although it has a circulation of 325,000, the magazine carries little advertising and reportedly lost more than $1.5 million last year. The Star and Tribune Co. announced last month that it was stopping publication with the August issue after months of searching for a qualified buyer.

Lapham announced the rescue to his staff, which had dwindled from 18 to about a dozen, in New York yesterday afternoon. He issued a statement calling Harper's revival "a victory for the best instincts of the American people and for the highest hopes of American pluralism and democracy . . . The MacArthur and Arco foundations have confirmed their faith in the diversity of opinion on which any Republic must rest."

The MacArthur Foundation began negotiations for the magazine "a couple of weeks ago" and reached all but final agreement at a meeting in Chicago's Drake Hotel Tuesday, according to MacArthur.

In the process, MacArthur said, "We went to Atlantic Richfield and asked if they'd like to join us." By then, he said, "we were well along" in the negotiations.

MacArthur guessed that the new entity to run the magazine will be called the Harper's Foundation. During the transition, which is expected to take several months, James A. Alcott will continue as Harper's publisher and then move on to Minneapolis to become a Star and Tribune Co. vice president as previously planned.

MacArthur Foundation president Corbally called the sale "an example of the way in which private philanthropy can contribute to the quality of thought in the United States." The MacArthur Foundation, which has assets approaching $1 billion, was founded by insurance tycoon John D. MacArthur. He left it the bulk of his insurance empire on his death in 1978.