  The structural phase transition in hexagonal BaMnO$_3$ occurring at $T_c$=130
K was studied in ceramic samples using electron and X-ray diffraction, second
harmonic generation as well as by dielectric and lattice dynamic
spectroscopies. The low-temperature phase (space group $P6_{3}cm$) is
ferroelectric with a triplicated unit cell. The phase transition is driven by
an optical soft mode from the Brillouin-zone boundary [$q =
(\frac{1}{3},\frac{1}{3},0)$]; this mode activates in infrared and Raman
spectra below $T_c$ and it hardens according to the Cochran law. Upon cooling
below $T_c$, the permittivity exhibits an unusual linear increase with
temperature; below 60 K, in turn, a frequency-dependent decrease is observed,
which can be explained by slowing-down of ferroelectric domain wall motions.
Based on our data we could not distinguish whether the high-temperature phase
is paraelectric or polar (space groups $P6_{3}/mmc$ or $P6_{3}mc$,
respectively). Both variants of the phase transition to the ferroelectric phase
are discussed based on the Landau theory. Electron paramagnetic resonance and
magnetic susceptibility measurements reveal an onset of one-dimensional
antiferromagnetic ordering below $\approx220\,\rm K$ which develops fully near
140 K and, below $T_{n} \approx 59\,\rm K$, it transforms into a
three-dimensional antiferromagnetic order.
