In this paper we introduce a model which describes the relation of matter and the electromagnetic field from a unitarian standpoint in the spirit of ideas of Born and Infeld. In this model, based on a semilinear perturbation of Maxwell equations, the particles are finite-energy solitary waves due to the presence of the nonlinearity. In this respect the matter and the electromagnetic field have the same nature. Finite energy means that particles have finite mass and this makes electrodynamics consistent with the special relativity. We analyze the invariants of the motion of the semilinear Maxwell equations (SME) and their static solutions. In the magnetostatic case (i.e., when the electric field E = 0 and the magnetic field H does not depend on time) SME are reduced to the semilinear equation ∇ ×∇ ×A = f (A), (1) where ∇× denotes the curl operator, f is the gradient of a strictly convex smooth function f : R3 → R and A : R3 → R3 is the gauge potential related to the magnetic fieldH (H = ∇×A). Due to the presence of the curl operator, (1) is a strongly degenerate elliptic equation. Moreover, physical considerations impel f to be flat at zero (f (0) = 0) and this fact leads us to study the problem in a functional setting related to the Orlicz space Lp + Lq . The existence of a nontrivial finiteenergy solution of (1) is proved under suitable growth conditions on f. The proof is carried out by using a suitable variational framework related to the Hodge splitting of the vector field A.