Expanding on a bank-branding agreement, reducing vault cash expenses and moving more of its automated teller machines to in-house processing helped Cardtronics Inc. report its first profit Wednesday in several years.

The Houston ATM operator reported second-quarter net income of $2.59 million, compared with a net loss of $3.62 million the year earlier, based on generally accepted accounting principles. It said its revenue fell 1.8%, to $124.6 million.

This was the first profitable quarter for Cardtronics since the fourth quarter of 2006.

In March of this year, chief executive Jack M. Antonini left the company; Cardtronics has not yet named a successor.

Cardtronics said that one reason for its shift into the black in the quarter was the expansion of a relationship with a major bank-branding client to include 1,300 more retail locations throughout the United States, most of which involve existing Cardtronics ATMs.

The agreement was something of a turnaround for Cardtronics' bank-branding operation, which puts banks' names and logos on Cardtronics ATMs at retail sites. The deals are generally seen as a low-cost way for financial companies to expand their presence in a region without buying or installing ATMs on their own.

When the company reported first-quarter results in April, J. Christopher Brewster, its chief financial officer, complained that "bank-branding revenues have slowed because financial institutions have cut their bank-branding agreements."

In addition to the expansion, Cardtronics said it had renegotiated an ATM agreement with a bank-branding client that had been placed under control of the Federal Deposit Insurance Corp.

Cardtronics spokesman Joel Antonini would not name either of the banking company clients.

The company continues to shift its ATM fleet to its in-house electronic processing platform.

As of June 30, it was processing transactions from more than 30,000 ATMs, including more than 2,500 operated by its Bank Machine Ltd. unit in the United Kingdom and 1,800 operated by Cardtronics Mexico in Mexico City.

At the end of the second quarter, Cardtronics managed or owned 33,002 ATMs, up from 32,801 machines a year earlier.

Cardtronics also said it has signed agreements with ATM maintenance and armored car service providers that are expected to yield significant cost savings in the coming years.

Antonini declined to say how much money in-house processing is saving Cardtronics, but the company reported that ATM operating margins grew to 31% of revenues, from 24%.

Franco Turrinelli, an analyst at William Blair & Co., said the company's revenue exceeded both his expectation, for $118.9 million, and analysts' average forecast of $118.7 million.

He said that the bank-branding deals, increased use of in-house processing and lower cash-vault costs all helped drive up margins at Cardtronics. "The swing to profit is the natural consequence of higher revenue and lower expenses," he said.

Fred Lummis, Cardtronics chairman and interim CEO, said he was pleased with the results.

"We posted very solid operating results in the second quarter," he told analysts during a conference call Wednesday to discuss the results.

"The revenues were up on an FX [foreign exchange] basis year-over-year, driven by higher transaction counts and a better mix of transactions across the board," he said. "ATM operating costs were down due to the implementation of several strategic initiatives and continued realization of benefits derived from our scale."

He said that a portion of the profits had been used to pay down a revolving credit line by $24 million.

The results prompted Cardtronics to raise its guidance for the year.

It now expects revenue of $470 million to $480 million, compared to its earlier forecast of $460 million to $470 million, and earnings before interest, taxes, depreciation and amortization of $95 million to $100 million, up from $75 million to $80 million.