We report on real-time detection of single electrons inside a n-p-n bipolar junction transistor at room temperature. Single electrons injected through the base-emitter junction trigger with a high probability the avalanche breakdown of the strongly reverse-biased collector-base junction. The breakdown, rapidly stopped by an avalanche quenching circuit, produces a voltage pulse at the collector which corresponds to the detection of a single electron. Pulse rates corresponding to currents down to the attoampere range are measured with an integration time of about 10 s. © 2008 American Institute of Physics.