We present the first solar flare observations with the KOSMA submillimeter telescope at 230 and 345 GHz. The GOES X2.0 flare on April 12, 2001 was also observed at millimeter and centimeter wavelengths, as well as in soft and hard X-rays. It exhibits both an impulsive phase of nonthermal gyrosynchrotron radiation and an extended phase of strong thermal free-free emission in the millimeter and submillimeter range. As in previous observations, a mismatch between the electron energy spectral indices, inferred from the millimeter and hard X-ray data, exists and is interpreted as a flattening of the energy spectrum above a break energy of several hundred keV. The observed thermal emission closely follows the shape of the mm/submm flux density time profile predicted from soft X-ray observations. As the observed absolute flux densities exceed the predicted ones by a factor of ~1.5–3.4, both the mm/submm emission and the soft X-rays must be thermal bremsstrahlung with a common energy source, but from locations with different plasma parameters. KOSMA observations allowed an estimate of source locations and sizes for the nonthermal and thermal sources. All of them coincide within 0.2 arcmin and with those seen in soft and hard X-rays. Surprisingly, the thermal submillimeter source diameters at 230 and 345 GHz (42 and 70 arcsec respectively) increase with frequency.