Continental Airlines , which is being bought by United Airlines, posted a second-quarter profit on Thursday helped by higher air fares and trimmed capacity.

Continental posted net income of $233 million, or $1.46 per share, compared with a net loss of $213 million or $1.72 per share a year earlier.

Excluding $24 million of merger-related costs and other charges, Continental reported a profit of $1.60 per share.

Revenue rose 18.6 percent to $3.7 billion. Fares on flights Continental flies jumped 16.3 percent in the quarter.

Earlier this year, United, a unit of UAL Corp , said it would buy Continental in an all-stock deal to create the world's largest airline. The companies expect to close the deal in the fourth quarter of 2010.

(Reporting by Deepa Seetharaman; Editing by Derek Caney)