The direct and inverse spectral problems are solved for a wide subclass of the class of Schwarz matrices. A connection between the Schwarz matrices and the so-called generalized Hurwitz polynomials is found. The known results due to H. Wall and O. Holtz are briefly reviewed and obtained as particular cases. * Supported by the European Research Council under the European Union's Seventh Framework Programme (FP7/2007-2013)/ ERC grant agreement no. 259173.1 Schwarz himself [15] considered also the matrices whose (1, 1)th entry is zero while (n, n)th entry is nonzero. Sometimes such matrices are called the Schwarz matrices as well (see e.g. [7]).