BEIJING -- A Chinese man upset over a financial dispute set fire to a moving bus and fled as the flames trapped people inside, killing 17 of them and injuring 32, authorities and state media said.

Several hours later police caught 33-year-old Ma Yongping on a construction site in Yinchuan, the capital of Ningxia region, the regional government's news office said.

State media reported the suspect was upset over a financial dispute with a subcontractor on a settlement project.

The man carried two buckets of gasoline onto the bus, ignited them with a lighter and escaped from the window on the bus driver's side, state media said.

The state broadcaster CCTV said the suspect surrendered after a four-hour standoff with police.

The fire broke out at about 7 a.m. on a moving bus, trapping many people inside. The government said firefighters put out the flames in five minutes and that eight of the injured were in critical condition.

Several serious bus fires in recent years in China have been blamed on people who were mentally unstable or with personal vendettas.

In 2013, a fire killed 47 people on a bus in the southeastern city of Xiamen. Police concluded a resident fed up with his life set the fire in anger and killed himself in the blaze.

Last year, a 35-year-old man was executed for starting a fire on a bus in Hangzhou in July 2014 that injured 33. A court said Bao Laixu had been seeking revenge against society and because he wanted to end his own life after a relapse of tuberculosis.