Northrop Grumman Corp.’s second quarter profit dropped by 20 percent as the No. 2 defense contractor said it was hurt by higher pension costs and higher estimates of costs to complete several ships being built in its Gulf Coast yards.

The company, which makes military aircraft and defense electronics, said Thursday it earned $394 million, or $1.21 per share, in the three months ended June 30, down from $495 million, or $1.44 per share, a year ago.

Revenue rose 4 percent to $8.96 billion from $8.63 billion a year ago.

Excluding a gain of $64 million, or 13 cents per share, for legal matters, and a $105 million charge, or 21 cents per share, for cost increases to ships under construction at Gulf Coast shipyards, Northrop Grumman said it would have earned $1.29 per share.

The Los Angeles-based company, which is second to defense contractor Lockheed Martin Corp. in revenue, reiterated its 2009 outlook of $4.65 to $4.90 per share, which is below analysts’ forecast of $4.96 per share.

Its shares fell $1.50, or 3.2 percent, to $45.63 in afternoon trading.

As of June 30, Northrop received a total of $7.5 billion in new business awards, the same as it received a year earlier.

The company had a total backlog of $70.4 billion by the end of second quarter, up from $66.9 billion in the prior year period.

The quarter’s results included a net pension adjustment that reduced earnings from continuing operations by $49 million, or 15 cents per share. That compares with an earnings increase in last year’s second quarter of $45 million, or 13 cents per share.

Sales were led by the company’s electronic systems business, which increased 18 percent in the second quarter. Northrop Grumman said deliveries were up for of aircraft and space-based infrared systems and postal automation programs.

And its aerospace systems sales increased 8 percent, principally due to manned aircraft programs such as the fighter jet F-35 and other aircraft, including unmanned aircraft planes and other programs.

Shipbuilding sales in the quarter fell 10 percent, primarily due to lower volume for expeditionary warfare programs. But the decline was partially offset by higher volume for submarine programs, Northrop Grumman said.

CEO Ron Sugar said Northrop Grumman advised investor analysts in May that it “may have additional bumps in the road in shipbuilding” and costs were accounted for in this year’s earnings per share guidance.

Wes Bush, president and chief operating officer, said Northrop Grumman’s 2009 guidance “contemplated the potential for additional risk on the Gulf Coast,” and the company is on track to achieve its 2009 earnings guidance.

Sugar said the review of defense spending by the Pentagon and Congress “will give us a better understanding of the administration’s longer-term priorities and plans.”