A would-be armed robber is behind bars in Brisbane after three good Samaritans chased him down the road and crash-tackled him.

The offender allegedly tried to rob a pharmacy in Kenmore in the city's west with a knife on Saturday, demanding the store's employee hand over cash.

Police said the man fled on foot after noticing a member of the public watching him from outside.

That man, a 21-year-old good Samaritan, gave chase and was soon joined by two other men.

The trio crash-tackled the alleged offender in the grounds of a nearby school and held him until police arrived.

The 29-year-old Lawnton man has been charged with entering premises to commit an indictable offence.

He has been remanded in custody and is due to appear in court on Monday.