General Dynamics (GD) swung to a profit in the fourth quarter, a year after a significant write-down pressured earnings.

The world’s fourth-largest defense contractor said Wednesday it logged a profit of $495 million, or $1.40 a share, versus a year-ago loss of $2.13 billion, or $6.07 a share. Per-share earnings for continuing operations checked in at $1.76.

The comparable quarter included a one-time charge of $2 billion related to the impact of the Pentagon’s spending cuts on General Dynamics’ information systems and technology unit. In the fourth quarter, General Dynamics recorded a $129 million loss in discontinued operations, reflecting a pending settlement of litigation tied to the A-12 fighter jet.

Revenue ticked 0.4% higher to $8.11 billion, beating Wall Street’s call for $7.99 billion. The company also topped expectations for per-share earnings by a penny.

Military contractors like General Dynamics, the world’s fourth largest by revenue, have recently battled with a slowdown in spending at the Pentagon.

Congress recently passed a $582 billion military spending bill for fiscal 2014, raising spending for shipbuilders like General Dynamics. However, the bill also cuts back on other key areas for the company, such as military vehicles.

General Dynamics said it had a total backlog of $46 billion at the end of 2013, down from $51.3 billion the prior year.

Shares were up 19 cents at $95.49 in early morning trading.

Follow Matthew Rocco on Twitter @MatthewRocco