Under the agreement, the trade in electricity with Belarus will stop when the Belarusian nuclear power plant near Ostrovets in western Belarus begins operation and a system of certificates showing the origin of electricity will be introduced.
Electricity from Ostrovets, where two reactors are under construction, would otherwise reach Baltic markets through Latvia, which buys electricity through the Russian grid. Latvia agreed not to buy electricity from Ostrovets last week.
The new agreement is valid until the synchronisation of the Baltic electricity systems at the end of 2025.
The Belarusian nuclear station has been a contentious issue between the Baltic states with Lithuania having been against the construction of the power plant since its inception.
Lithuanian authorities have said the station is unsafe. In order for the boycott to be effective, Lithuania has been seeking Latvia and Estonia join the boycott.
The Baltic states are planning to synchronise electricity grids with Continental Europe by 2025 which should end the discussion of using Belarusian electricity. It is the period until then that was causing problems.