Abstract-Low Density Parity Check (LDPC) codes over nonbinary Galois Fields GF(q) are a generalization of the industrial standard binary LDPC codes for forward error correction in communication and information systems. The nonbinary codes can achieve significantly better performance for short and moderate block lengths. A lot of works concerning "good" LDPC codes parity check matrix construction has been published so far. However, it is well known that efficient partially parallel hardware decoder architectures are allowed only for codes with blockwise partitioned structure of the parity check matrix, called structured codes. In this paper we present a versatile algorithm for construction of codes that are both nonbinary and structured. The proposed algorithm aims at optimizing the code graph (Tanner graph) by reducing the existence of small cycles with low external connectivity, while at the same time selecting appropriate nonzero coefficients from the Galois Field under interest. The algorithm can be used for code construction of any field order, block length and code rate.