San Francisco-based Virgin America was founded in 2007 and has yet to post an annual profit. But it has slowed its growth and is aiming to improve its finances.

That happened with the quarterly results released on Wednesday. It posted net income of $8.8 million for the quarter that ended June 30, after losing $31.8 million a year earlier. Revenue rose 8 percent to $376.1 million.

While the airline was profitable for the quarter, it lost $31.7 million in the first six months of 2013.

Virgin America does much of its flying between New York and San Francisco and Los Angeles. It has recently added San Francisco-to-Newark, N.J., which puts it in head-to-head competition with United Airlines, which has hubs in both of those cities. It's also flying to Anchorage this summer.

Its coast-to-coast flying has been met with fierce resistance from other airlines. JetBlue Airways Corp. announced on Monday that it will add new first-class cabins for transcontinental flights. And United Continental Holdings Inc. went from nine flights per day to 15 between San Francisco and Newark, Virgin America CEO David Cush said in an interview.

He said Virgin America's flights to Newark are already profitable. But how long can they last against United?

"We can sustain it forever. We think it'll be profitable at current fare levels," he said. "All it did was reduce Newark fares to the same level as JFK fares."

Anchorage has not gone as well, he said. Several other airlines added flying there this year. Cush said it's 50-50 whether Virgin America will fly there again next summer.

He said it's still possible that Virgin America will try for an initial public offering next year, although it could fall into the second half of 2014, or into 2015, he said.

Virgin America is privately held, but releases some quarterly financial results. A minority stake is held by Sir Richard Branson's Virgin Group, which runs Virgin Atlantic.