Updated

A Florida student who reportedly left class to rob a woman inside her home met his match when he was pinned to the ground by the woman's ax-wielding boyfriend, police said.

Alex McMaster told Fox 13 he woke up in his Pinellas Park home Wednesday morning to the sounds of his girlfriend screaming at the front door. When he went downstairs he saw 17-year-old Matthew Cleveland punching and choking Christina Robles, authorities said.

McMaster said he then punched the teen and slammed him to the ground.

"I held him there a minute 'till he calmed down," McMaster told FOX13. "Then I grabbed an ax that I had and held it above him and told him to follow my commands -- or I could do something else to him."

"Then I grabbed an ax that I had and held it above him and told him to follow my commands -- or I could do something else to him."

— Alex McMaster

McMaster said Cleveland then confessed to a robbery attempt and revealed he forced his way into the home after asking McMaster’s 33-year-old girlfriend where a park was located.

"I asked him what he was doing. He said he was trying to get money off her," McMaster said. "He said he would have hurt her."

TENNESSEE WOMAN BEATS HOME INVASION SUSPECT WITH BASEBALL BAT

Cleveland, a senior at a local school for teens with behavioral issues, had left morning classes apparently to attempt the home invasion, police told FOX13.

Cleveland was charged with home invasion robbery, felony battery by strangulation and two counts of simple battery, WPTV reports.

As for McMaster, he said he was fortunate the ax was nearby during the attack.

"Someone comes into your house, you don't expect to see that," McMaster said. "Everyone says what they are gonna do but you don't think until the person is standing there."