We present N-band photometry for a sample of 21 dust-enshrouded AGB stars in the Large Magellanic Cloud, and three additional sources in the Small Magellanic Cloud. Together with near-infrared photometry, this is used to give a tentative classification into carbon and oxygen-rich atmospheres. Bolometric luminosities are also estimated for these stars. In addition, we present the results of a survey for OH masers in the LMC, which resulted in the discovery of OH maser emission from IRAS04407-7000. Spectra between 600 and 1000 nm have been obtained for two heavily obscured AGB stars in the LMC, confirming them to be highly reddened very late M-type giants. Because the dust-enshrouded stars are clearly undergoing heavy mass loss they are assumed to be very near the termination of their respective Asymptotic Giant Branch phases. The fraction of mass-losing carbon stars decreases with increasing luminosity, as expected from Hot Bottom Burning. The best candidate carbon star, with M-bol similar to -6.8 mag, is the most luminous mass-losing carbon star in the Magellanic Clouds, and amongst the most luminous AGB stars. At lower luminosities (M-bol similar to -5 mag) both oxygen and carbon stars are found. This may be explained by a range in metallicity of the individual mass-losing AGB stars.