The Yohkoh spacecraft observed a large flare (Ha importance 3B and GOES (Geosynchronous Operational Environmental Satellite) class X6.1) on 27 October 1991. The flare showed strong gammaray emission above 1 MeV. The gamma-ray spectrum, which extends to 10 MeV/nuc, consists of electron bremsstrahlung continuum and several gamma-ray lines. The gamma-ray observation indicates that electrons and protons were accelerated to >1 MeV and >10 MeV, respectively, during the maximum phase of the flare. Assuming second-order Fermi stochastic acceleration, we derive the Bessel functiontype proton spectrum of aT = 0.029 from a ratio of neutron capture line to nuclear deexcitation line fluences and estimate several parameters describing the acceleration process. In a case of first-order Fermi shock acceleration, the proton spectrum can not be derived from the gamma-my lines. If the shock compression ratio (ratio of upstream to downstream bulk plasma flow velocities) and the spectral characteristic energy are taken to be 1.8 and 100 MeV, respectively, the shock acceleration gives the proton spectrum similar to that obtained from second-order Fermi stochastic acceleration. It is not possible to determine the acceleration mechanism from the gamma-ray lines alone. Moreover, the Yohkoh hard X-ray spectrometer observed 7Be (429 keV) and 7Li (478 keV) lines resulting from 4He+ 4He reactions from two flares on