Countries will now have to notify the Commission before concluding any oil and gas-related intergovernmental agreements with non-member states, and then take "utmost account" of the Commission's opinion before signing the agreement.
This is part of the sustainable energy security package proposed by the Commission in February, it said, and will strengthen the EU's resilience to gas supply disruption.
Under current rules agreed in 2012 countries must notify the Commission of such energy agreements, but only after they have been signed. Of the 124 agreements notified since 2012, however, one third of agreements relating to energy infrastructure or supply contained provisions that were not compliant with EU law, the Commission said.
"Moreover, it has proven very difficult to renegotiate or terminate intergovernmental agreements once they have been signed by the parties. In fact, no intergovernmental agreement has been successfully renegotiated as yet," it said.
Intergovernmental agreements related to electricity will be covered by a mandatory assessment, but not until after they have been signed. However, a review clause has been inserted to possibly include electricity-related agreements in the mandatory pre-assessment in the future.
Maroš Šefčovič, European Commission vice-president for the energy union, said: "One of the energy union's main objectives is to enhance energy security, solidarity and trust. An important element in ensuring energy security is full compliance of agreements related to buying gas and oil from third countries with EU law. Practice has shown that renegotiating intergovernmental agreements, once they have been concluded, is very difficult, to the detriment of the member state concerned and the European Union. Today's agreement ensures that rather than assessing whether international agreements comply with EU law after they are signed, member states will now do so in advance. This is a big political and legislative achievement".
The text of the agreement has yet to be formally approved by the European Parliament and the Council.
The energy security package announced by the Commission in February includes moves to ensure access to gas supplies. Dependence on external suppliers such as Russia makes Europe vulnerable, and the Commission proposes a shift to a regional rather than a national approach, with a "solidarity principle" where neighbouring states would help to ensure gas supplies for households and essential social services.