The Los Angeles real estate investment trust — which also owns buildings in Glendale, Pasadena and Orange County — stuck to its strategy of letting go of properties that were heavily encumbered with debt.

MPG finished the quarter that ended March 31 with a profit of $5.2 million, or 10 cents a share, compared with a loss of $39.5 million, or 81 cents a share, in the same period of 2011. Revenue was $88 million, up 11%.

Second-quarter earnings got a boost from the cooperative foreclosure of two Glendale office buildings, which relieved MPG of the obligation to pay more than $100 million in mortgages in the years ahead.

"MPG is sort of like the U.S. economy — it's not pretty, but it is surviving," said analyst Michael Knott of Green Street Advisors.

The landlord reported that it had $212.8 million in cash at the end of the quarter, of which $166.7 million was unrestricted.

"They're boosting their cash to survive and pull through the economic bottom until things turn around in downtown L.A.," said analyst Craig Silvers, president of Bricks & Mortar Capital.

Funds from operations, a key measure for real estate investment trusts, reached $10.7 million, or 21 cents a share, compared with a negative $13.5 million, or 28 cents a share, a year earlier.

MPG's Two California Plaza, a downtown Los Angeles office building with more than 1.3 million square feet of space, was placed in receivership in March.

Shares of MPG closed up 6 cents to $2.11 before earnings were released.