It is well known that all sorts of systems tend towards minimal potential energy. I was wondering if this applies to static electric fields also, i.e. is an electric field such that it's energy integrated over all space is minimal? For example if we have a bounded source free region and if the electric field on the boundary is defined, does the electric field inside have minimal energy of all possible configurations? With possible configurations I mean all such which follow the Gauss law, but not necessarily the other Maxwell's laws. The same question for magnetic fields.