LONDON--International Consolidated Airlines Group SA (IAG.LN) said Friday the restructuring at its Spanish unit Iberia was starting to bear fruit, as the carrier swung to a profit for the second quarter and said it expected to grow capacity by 5% for the full year.

"These are positive results for the quarter," Chief Executive Willie Walsh said. "Several factors have contributed to this improvement. Firstly, the benefits of Iberia's restructuring are beginning to show. British Airways' performance has improved, and Vueling--which joined IAG in April--has continued to manage its capacity growth effectively by expanding its business while increasing profits."

IAG, the parent company of British Airways and Iberia, posted a better-than-expected second-quarter operating profit of EUR245 million, from a year-earlier loss of EUR4 million. An analyst consensus had forecast operating profit of EUR163 million.

It reported a net loss of EUR503 million for the six months to June 30, compared with a net loss of EUR207 million a year earlier. Revenue was EUR8.7 billion, up 4% from a year earlier.

Like rival flag carriers in Europe, IAG has been relying on long-haul flights while struggling to keep Iberia's shorthaul business profitable as low-cost carriers such as Ryanair Holdings PLC (RYA.DB) and easyJet PLC (EZJ.LN), free of legacy costs and unconstrained by global networks, continue to capture market share.

Shares closed Thursday at 297 pence valuing the company at GBP5.5 billion

Write to Marietta Cauchi at marietta.cauchi@wsj.com

Subscribe to WSJ: http://online.wsj.com?mod=djnwires