WASHINGTON (AP) _ Despite economic problems, the nations of the world stepped up their spending on arms to nearly $900 billion in 1985, an increase of 3.7 percent from the previous year, the U.S. Arms Control and Disarmament Agency estimated Friday.

The United States and the Soviet Union, which together account for more than half the weapons sales, continued to run neck-and-neck. Over the 1981-1985 period, the Soviets sold $55.7 billion worth of arms, or nearly 30 percent of weapons purchased by all nations.

The United States, meanwhile, sold $49.2 billion, or 26 percent, but was ahead of the Soviets in two of the years, 1983 and 1985.

The U.S.- and Soviet-led alliances - the North Atlantic Treaty Organization and the Warsaw Pact - accounted for 77.3 percent of military spending in 1984, the last year for which detailed statistics were compiled.

The 17th annual report of the arms control agency did not list any U.S. weapons sales to Iran. Officials, demanding anonymity, said they relied on the Central Intelligence Agency and other U.S. intelligence groups for their information.

President Reagan has acknowledged authorizing surreptitious arms sales to Iran beginning in November 1985 through Israel. Up to $30 million worth were provided before deliveries were stopped last year.

Ranked behind the two superpowers were Great Britain, China, West Germany, France, Saudi Arabia, Iraq, Poland and Japan.

Africa was the only region of the world in which the growth rate of military spending declined between 1980 and 1984.

At the same time, the growth of the world's armed forces accelerated. Iraq, which is locked in a 6 1/2 -year-old war with Iran, accounted for 30 percent of the increase in 1984. NATO grew at a rate of 1.3 percent, compared with the Warsaw Pact's growth of 0.9 percent.

Iraq is also the world's leading arms importer. It bought $7.7 billion worth in 1984, more than twice Saudi Arabia, which ranked second with $2.6 billion. The next leading importers were Iran, $2.2 billion; Libya, $1.8 billion; Egypt, $1.6 billion; and Syria, $1.5 billion.

China bucked the trend in military spending. It reduced its armed forces to 4.1 million personnel in 1984, from a peak of about 4.75 million in 1981, but still ranked second only to the Soviet Union, which had 4.5 million troops under arms.

The United States was third with 2.2 million military personnel, and two developing countries, India and Vietnam, fourth and fifth with 1.4 million and 1 million, respectively.

Five developing countries - Turkey, Iraq, North Korea, Pakistan and South Korea - ranked next in order, exceeding such traditional military powers as France, Italy and West Germany.

Third World arms producers captured only 7 percent of the arms market in 1985, barely above the level of a decade ago.