Two teens were busted after a teacher found them in the bathroom of a Brooklyn middle school with a loaded handgun, sources said.

The 13- and 14-year-old kids were discovered handling a loaded .25-caliber gun in Bedford-Stuyvesant at around 9:30 a.m. Monday morning, according to law- enforcement sources.

The teacher at the Monroe Street school alerted police and the teens were arrested and charged with criminal possession of a loaded firearm.

The names of the two teenagers were being withheld because they are minors.