Boeing Co. delivered more commercial airliners in the first quarter, offsetting sluggish results in the defense side of its business and pushing its first-quarter earnings up 38 percent.

The profit topped Wall Street expectations, but revenue was below forecasts, and production costs of the Boeing 787 jet continued to pile up. The shares fell about 4 percent in afternoon trading.

Boeing and European rival Airbus Group N.V. are benefiting as airlines use some of their record profits to buy new and more fuel-efficient jets. Boeing executives predict that increased travel, new routes and airline growth will bolster plane sales for years to come. They brush aside concern that falling oil prices could undercut demand or cause airlines to delay purchases.

"These remain very good times for our industry," CEO Jim McNerney told analysts on a conference call. He said demand for planes is tightly related to airline profits, and lower oil prices since last summer have not changed the airlines' plans to upgrade their fleets.

Boeing delivered 184 airliners in the quarter, up from 161 in the same period last year, with two-thirds of them for the venerable 737 jet, a workhorse on short and mid-range routes around the world.

Meanwhile, orders minus cancelations rose by a net of 110 in the quarter, and Boeing now has 5,700 orders on its books. About half are for an upcoming version of the 737. The backlog is valued at $495 billion.

Boeing is still losing money on its innovative 787 passenger jet, made with a large share of lightweight carbon composites to save fuel. The company hopes to begin turning a profit on the plane soon, and the rate of so-called deferred production costs slowed from both a year ago and last year's fourth quarter.

Cowen and Co. analyst Cai von Rumohr called the 787-cost trend "very encouraging," and Jefferies analyst Howard Rubel said the company "is starting to show good improvement in its production costs."

The Chicago-based company said that net income rose to $1.34 billion, or $1.87 per share. Excluding $113 million in pension expenses, the company said adjusted profit was $1.97 per share — beating the $1.81 per share forecast by analysts surveyed by Zacks Investment Research. A year earlier, adjusted profit was $1.76 per share.

Revenue rose 8 percent to $22.15 billion. That was short of the $22.63 billion expected by six analysts surveyed by Zacks.

The company reaffirmed its forecast for full-year earnings in the range of $8.20 to $8.40 per share and revenue between $94.5 billion and $96.5 billion.

As in recent quarters, it was a tale of Boeing's two very different business segments:

— Earnings from commercial airplanes rose 8 percent on a 21 percent jump in revenue. That segment accounted for two-thirds of profit and sales.

— The defense and space business declined, with earnings down 4 percent and revenue off by 12 percent, as tight defense budgets cut into sales.

Boeing shares fell $4.14, or 4.1 percent, to $149.19 in afternoon trading. They began the day up 18 percent so far in 2015, compared with about a 2 percent gain in the Standard & Poor's 500 index.