Global military spending was down in 2012 for the first time since 1998. And for the second year in a row, arms sales from private industry to governments were down as well last year.

Despite the decline in military spending, the business of war remains a good one. The 100 largest arms producers and military services contractors recorded $395 billion in arms sales in 2012. Lockheed Martin, the largest arms seller, alone accounted for $36 billion in such sales during 2012. Based on figures compiled by the Stockholm International Peace Research Institute (SIPRI), 24/7 Wall St. examined the 10 companies profiting most from war.

The withdrawal of U.S. troops from Iraq and Afghanistan is among the biggest reasons for the drop in military spending, according to SIPRI. Spending on these campaigns fell from $159 billion to $115 billion between 2011 and 2012.

MORE: 10 States Where Income Inequality Has Soared

Austerity also contributed to cuts in military spending. Budget control measures were responsible for a $15 billion reduction in U.S. military expenditures in 2012. Belt-tightening in Europe also had an impact on arms sales. In 20 of the 37 countries in Western and Central Europe, military spending declined by more than 10% between 2008 and 2012.

In an interview with 24/7 Wall St., Dr. Samuel Perlo-Freeman, director of the SIPRI Programme on Military Expenditure and Arms Production, said that while government military spending is waning in the United States and Western Europe, many developing countries are increasing their expenditures. Arms sellers in several countries, most notably Russia, are benefiting from their nation’s military budget expansion, Perlo-Freeman noted. While U.S. military expenses declined in 2012, Russia’s increased by an estimated 16% that year.

Companies reacted differently to the sales downturn. L-3 Communications spun off part of its business in 2012 to limit exposure to declining government military spending. Other government contractors wrote off significant losses in response to decreased military spending, including General Dynamics, which took a $2 billion goodwill charge related to declining opportunities in the defense sector.

MORE: 10 Retailers With the Worst Customer Service

Faced with possible tough times, some companies have engaged in corrupt practices. Last year, the CEO of Italian aerospace and defense firm Finmeccanica was charged by Italian prosecutors with fraud and corruption related to the company’s sale of helicopters to the Indian government. However, according to Perlo-Freeman, this is nothing new. “The arms industry has always been associated with corruption both in international arms transfers and sometimes in domestic procurement.”

Arms sales have remained concentrated among the same small number of companies for more than a decade. The top 10 companies have largely remained in place because industry consolidation in the 1990s made them dominant players, even through fluctuations in government military spending. “These companies tend to have their core competencies in getting money out of governments,” Perlo-Freeman said.

To identify the 10 companies profiting most from war, 24/7 Wall St. reviewed the 10 companies with the most arms sales based on SIPRI’s list of the top 100 arms sellers in 2012. Arms sales, including advisory, planes, vehicles and weapons, were defined by sales to military customers, as well as contracts to government militaries. We also considered the company’s 2012 total sales and profits, and the total number of employees at the company, as well as nation-level military spending, all provided by SIPRI.

These are the companies profiting the most from war:

5. General Dynamics

> Arm sales 2012: $20.9 billion

> Total sales 2012: $31.5 billion

> 2012 profit: -$332 million

> 2012 employment: 92,200

Like many of its defense-sector competitors, Virginia-based General Dynamics Corp. (NYSE: GD) felt the sting of the decreased U.S. military spending. The company, which specializes in aircraft, land and expeditionary combat vehicles, and shipbuilding, lost $332 million in 2012, and its arms sales totaled $20.9 billion, down from $23.3 billion the year before. The loss was due, in large part, to a $2 billion goodwill charge related to declining business opportunities in the defense sector. In its most recent year, the company reported a 16.4% drop in sales in its combat systems group, for which the U.S. Army is major customer.

MORE: America’s Most and Least Literate Cities

4. Raytheon

> Arm sales 2012: $22.5 billion

> Total sales 2012: $24.4 billion

> 2012 profit: $1.9 billion

> 2012 employment: 67,800

While Raytheon’s 2012 arm sales of $22.5 billion were slightly lower compared to 2011, they remained high enough for the company to rank fourth among arms companies. The company, which traces its history back to 1922, assisted the United States in multiple wars, as well as the Apollo 11 moon landing. Raytheon Co. (NYSE: RTN) provides services in a variety of fields, from air and missile defense to radar and cybersecurity. In all, 92% of the company’s sales came from arms sales in 2012. But while the U.S. has cut defense spending in recent years, Raytheon has benefited from a surge in exports to foreign countries, which has helped to offset federal government belt-tightening.

3. BAE Systems

> Arm sales 2012: $26.9 billion

> Total sales 2012: $28.3 billion

> 2012 profit: $2.6 billion

> 2012 employment: 88,200

BAE Systems is the largest non-U.S. military contractor. It had $26.9 billion in arms sales in 2012, which represented some 95% of the company’s total sales. However, the British company’s year-over-year arms sales declined that year from $29.2 billion in 2011. Cuts by England’s Ministry of Defence have taken a toll on the company. As the U.K.’s largest military contractor, it received 13.7% of procurement funds spent in 2012 to 2013. In May 2012, the company announced it would close its Armstrong plant — which made tanks for the nation in World War I and had been in operation since 1847 — and cut 330 jobs as a result. BAE’s failed $45 billion merger with fellow defense contractor EADS in 2012 also hurt prospective sales of England’s main fighter jet, the British Tornado, for which BAE makes the parts.

2. Boeing

> Arm sales 2012: $27.6 billion

> Total sales 2012: $81.7 billion

> 2012 profit: $3.9 billion

> 2012 employment: 174,400

Although arms sales accounted for just 34% of Boeing’s revenue in 2012, Boeing Co. (NYSE: BA) was still the world’s second largest military contractor that year. In all, the company’s total revenue was nearly $82 billion in 2012. The company’s commercial airplane segment accounted for a large portion of its sales, with $49.1 billion in revenue that year. Boeing ended 2012 with $3.9 billion in profit and with more than 174,400 employees. Last year, Boeing and union workers in Washington state engaged in heated negotiations, with Boeing threatening to move jobs away from the state unless union workers agreed to concessions related to their pension plan.

1. Lockheed Martin

> Arm sales 2012: $36 billion

> Total sales 2012: $47.2 billion

> 2012 profit: 2.7 billion

> 2012 employment: 120,000

In 2012, Lockheed Martin Corp. (NYSE: LMT) led the world in arms sales, even as its arms sales declined slightly from $36.2 billion in 2011 to $36 billion in 2012. Such sales accounted for 95% of the Maryland company’s total revenue. The company, which employed 120,000 workers as of 2012, specializes in aerospace, global security and information technology systems for the military. It is also known for the C-5 Galaxy Class airplane — the largest air military transport plane in the world. Lockheed Martin has been the largest recipient of government procurement contracts and the top-ranked company on the Washington Technology Top 100 for 19 consecutive years. However, this has also left the company exposed to changes in the federal budget. In October 2012, at the request of President Obama, the company held off on firing thousands of workers that it previously warned it would have to lay off due to military spending cuts.

For the rest of the list, click here.

More from 24/7WallSt:

10 Weird Things Thieves Steal

The 10 Richest Presidents

America’s Most Content and Miserable States

Sign up for Inside TIME. Be the first to see the new cover of TIME and get our most compelling stories delivered straight to your inbox. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Contact us at letters@time.com.