Here we study the static potential for the two quarks and two antiquarks system. First this is done using the tetraquark operator, which has been previously used to calculate the static potential. This is found to give good results in the region where the tetraquark is expected to be the ground state, however failing outside it. To repair this, we resort to a variational method. This let us study the first excited state besides the ground state of the system in two different particle dispositions, one where the quarks are on the same side of a rectangle and the other where they are at opposite sides. Results for the field components and for the lagrangian density are presented.