The frequent occurrence of hard X-ray emission from the top of flaring loop
s was one of the discoveries by the Hard X-Ray Telescope on board the Japan
ese Yohkoh satellite. In this paper we take a hare current-sheet geometry a
nd show how the combined effect of magnetic field convergence and pitch-ang
le scattering of nonthermal electrons injected at the top of the loop resul
ts in the generation of a looptop source with properties akin to those obse
rved by Yohkoh. We demonstrate that a looptop source can be produced in bot
h impulsive and gradual phase loops. We further present a possible mechanis
m for the generation of high-temperature "ridges" in the loop legs.