Two would-be robbers met their match on Monday evening when they encountered a brave 10-year-old.

It all began around 5:30 p.m. when the suspects, dressed in disguise, knocked on the door of the boy's Brooklyn home. When two teenage girls opened the door, the two men pushed past them, telling them to get down on the floor while one of the suspects headed upstairs, according to The Associated Press.

When the suspect tried to enter a bedroom on the second floor, the 40-year-old homeowner slammed the door on his arm, causing him to drop the gun.

The homeowner's 10-year-old son then sprang into action, grabbing the gun and firing a shot into the wall. One of the suspects fired back, without hitting anyone. The would-be robbers then ran off without taking anything.

Police are investigating, according to AP. They say other kids were in the house at the time but did not witness the incident.

Another brave boy also recently made news for his quick thinking during a home invasion.

In Detroit, when burglars forced their way into Jaden Kanka’s home, the 9-year-old heard the intruders talking to his mom and boyfriend in the front of the house. He sneaked out the one-story bedroom window and ran to a neighbor, who called the police.

The criminals were still in the home when police arrived and were quickly arrested.