BEIJING (AP) _ The gunman in a rush-hour rampage on a major Bejing thoroughfare was an army officer who had been disciplined for beating another soldier, police said Wednesday.

Nine people were killed and 40 were wounded in the shooting Tuesday that ended when Tian Mingjian was killed by police following a chase through crowded streets and a 20-minute gunbattle.

An Iranian diplomat and his son were among those killed.

The shooting was shocking by Chinese standards. While violent crime is increasing in China, the incidence remains small compared with that of the United States.

Police identified the gunman as Tian Mingjian, a member of an army unit stationed in the capital's suburbs, the official Xinhua News Agency reported. It did not elaborate on the beating and the motive remained unclear.

Xinhua said police blamed Tian for all the deaths, though initial reports suggested two of the victims, an Iranian diplomat and his son, may have been killed by police cross fire.

Iran plans to send a team to investigate their deaths, the Iranian Embassy said Wednesday. Iran has lodged a formal protest.

The rampage began in the Beijing suburb of Tongxian, where the gunman commandeered a vehicle and headed toward the center of Beijing, said the Hong Kong China News Agency, regarded as a mouthpiece for the Chinese government.

The report said police blocked the gunman's route as he neared the Second Ring Road, a major thoroughfare near an apartment compound for foreign diplomats and journalists.

He then abandoned the vehicle and ran down the road, firing an automatic rifle at the rush-hour traffic and passers-by. After a 20-minute shootout, police killed the gunman, the report said.

Foreign witnesses saw the gunman shoot out the windows of a bus, shoot a motorcyclist and, at point-blank range, shoot a taxi driver and his passenger.

Yousef Mohammadi Pishknari, an attache at the Iranian Embassy, was driving his four children to school when they were hit by gunfire. He and his 10-year- old son, Ahmed, were killed. Another son and a daughter were wounded.

China has a strict ban on private ownership of guns and ammunition and harsh penalties, including wide use of the death penalty, to deter crime.