Police have cracked a massive online market in firearms, including high-powered war weapons and assault equipment, in a series of lightning raids across the country.

Officers from three police divisions raid one of 76 locations on Sept 17, 2016 to crack down on a massive online market in firearms. (Crime Suppression Division vdo)

In early morning action on Saturday on 76 locations in many provinces, a combined taskforce of officers from three police divisions detained 20 suspects and seized 141 firearms.

The raids were launched after it emerged that teenage students were buying firearms through social media and then committing crimes, said Central Investigation Bureau deputy commissioner Sommai Kongwisaisuk.

He said the "Black weapons online" operation found firearms were being sent through the mail after money was transferred to the sellers.

More than 164 people were found to be linked to the illicit online trade of weapons, Pol Maj Gen Sommai said.

Officers check firearms and other illicit items at a Bangkok location.

Officers from the Crime Suppression Division, the CIB and the Technology Crime Suppression Division took part in the raids and seized 32 licensed and 109 unlicensed weapons.

Among them were war weapons such as four AK-47s, one HK-33, five M16 assault rifles and 2,000 rounds of ammunition, Pol Maj Gen Sommai said.

The raids also uncovered the networks behind the illicit trade and police are widening their investigation, he said.

In Prachin Buri, police raided a barbecue restaurant in Kabin Buri district where they believed a cache of firearms and ammunition was stored.

A 9mm handgun, a hand-made .357 pistol, two smoke bombs and rounds of ammunition were hidden in various rooms.

Web war: Illicit firearms bought on the internet are displayed at the CSD. Police seized them during a 'Black weapons online' operation.

Pongsaton Sukmee, a son of the restaurant's owner, admitted to owning the items, police said.

He said he kept the weapons to defend himself as he had had a quarrel with local teenage drug pushers early this month.

An unknown number of gunmen had sprayed bullets at the restaurant, but no one was harmed in the incident, Mr Pongsaton told police.

Mr Pongsaton said he bought the two handguns from local teenagers and purchased two magazines of M16 rifle ammunition three months ago from a close friend, who is now in jail.

He said he bought the ammunition to sell to local teens, adding he intended to keep the two smoke bombs.

In Chumphon, police found eight firearms after raiding the house of Somsak Jongrak, 41, in tambon Thungka of Muang district.

Mr Somsak said three firearms -- a 9mm handgun, a .38 pistol and a shotgun -- were loaned to him. The other weapons were two hand-made pistols, a shotgun, a .38 handgun and a licensed 9mm pistol, all of which belonged to him.

In Trang, a combined force of 50 officers raided the house of 24-year-old Teerapong Prangpan in tambon Bangmak of Kantang district and found 15 firearms.

They are a HK 33 assault rifle, four .22 rifles and 10 handguns as well as more than 500 rounds of ammunition.

Police said Mr Teerapong admitted buying and selling firearms online, adding the items were delivered through intercity cargo trucks.

But he insisted the items seized from his house were only for his collection.

In Si Sa Ket, police raided a house in tambon Phu-nguen of Kantharalak district and found four firearms and various ammunition.

Police said informants reported a haul of firearms and ammunition had been hidden there. The illicit items were found in a closet.

Montri Namwong, the 34-year-old house owner, said there were firearms in his house because he offered a repair service.

In Bangkok, a raid on an apartment in Chatuchak District found two bullet-proof vests, firearm parts, two radios, two BB guns and magazines.

Wasan Lasut, 27, said he bought all of the items on the internet.