In this paper, a construction of maximum rank distance (MRD) codes as a generalization of generalized Gabidulin codes is given. The family of the resulting codes is not covered properly by additive generalized twisted Gabidulin codes, and does not cover all twisted Gabidulin codes. When the basis field has more than two elements, this family includes also non-affine MRD codes, and such codes exist for all parameters. Therefore, these codes are the first non-additive MRD codes for most of the parameters. (C) 2017 Elsevier Inc. All rights reserved.