Kenyan police have fired tear gas at children protesting against the seizure of their school playground by a property developer.

Around 100 primary school children and a small group of activists pushed over a newly built wall that separated playing fields and the school buildings, close to the capital Nairobi's main domestic airport on Monday.

Around 40 armed police accompanied by dogs dispersed the protesters by firing tear gas canisters, an AFP news agency photographer at the scene said.

Dozens of children were caught in choking clouds of tear gas before being forced to shelter on a pedestrian bridge over the main road to escape the noxious fumes.

The children were aged between eight and 13 years old.

Mwangi Kuria, a senior police officer at the demonstration told Kenya's local Daily Nation newspaper that officers had been deployed to "safeguard the property", adding that rocks had been thrown at his men.

"This is disputed land, but they should not use the children," Kuria was quoted as saying.

Two activists were detained by police, Kenyan media said.

Macharia Njeru, chairman of the Independent Policing Oversight Authority, said the incident would be investigated.

"Teargassing children is inexcusable," he said.

Well-known local activist Boniface Mwangi said a "school playground is a necessity, not a privilege".

When the teargas was thrown the MPs were whisked away by their bodyguards but the brave kids remained behind and demolished the wall. — Boniface Mwangi (@bonifacemwangi) January 19, 2015

Monday was the first school day since the wall was built during the holidays.

Speaking to Al Jazeera from Nairobi, Mwangi said that he witnessed the incident.

He said that the children had returned to school for their first day of classes for the new year to find that they could not gain access to the school playground.

"They decided to go around the playground, which has a very big fence ... They found developers had put up new gates surrounding the playground."

"The children were peaceful and all they wanted was access to their playground during break time. The children walked peaceful to the gate that has been set up by the grabber and police responded with tear gas. A few of them were injured," he said.

The children were peaceful,they were carrying leaves as a sign of peace,some parents were there too #OccupyPlayGround pic.twitter.com/lgejcN8Y97 — Boniface Mwangi (@bonifacemwangi) January 19, 2015

The incident sparked angry reactions on social media, including Twitter, where comments used the hashtag "#OccupyPlayGround".

Nairobi, a city of more than three million people, is rapidly growing and land prices are rising at some of the fastest rates anywhere on the continent, according to real estate experts.