Estonian Prime Minister Taavi Rõivas and his Finnish counterpart, Alexander Stubb, reached an agreement on Monday to build two liquefied natural gas (LNG) terminals, connected by a pipeline, in both countries by 2019.

The project is called ‘Balticconnector’, and if it succeeds, it would increase the energy diversification of the two nations, in light of the unpredictable behavior by Russia, currently the main gas provider for both countries. The project is likely to get financial support from the European Union.

The plans include the construction of a large-scale LNG terminal in Finland, which would then provide liquefied natural gas to users in the region at competitive prices. The Balticconnector pipeline would link gas markets in Finland and Estonia. A small-scale LNG terminal would be built in Estonia for distribution of gas and security of supply. According to the plan, the development of gas infrastructure in the Baltic region would enable Finland and the Baltic states to access the underground gas storage in Latvia, as well.

The prime ministers agreed that Finland and Estonia will implement the LNG projects as soon as it is technically and economically feasible to do so, but the aim is to have the Balticconnector pipeline up and running in 2019. It was also agreed that the terminal may be built in Estonia in case that its implementation has not proceeded sufficiently by the end of 2016.

Rõivas told ETV news program “Aktuaalne Kaamera” that despite the fact that the original aim was to achieve the building of large-scale LNG terminal in Estonia, he is content to have reached an agreement.

“Let’s start with the fact that Estonia will get its own terminal. True, not the regional one, but one which ensures energy security. Also, if the Finnish government for some reason will not proceed with the plans for the regional terminal by the end of 2016, it could be built in Estonia. From our point of view, it was important to move forward, after three years of negotiations that went nowhere,” Rõivas said.

Estonian daily Postimees went as far as to call the agreement a “fiasco”. ETV also cited the fact that the small supply terminal would still be relying on Finland, itself supplied by Russia’s Gazprom, rather than functioning as an independent energy storage.

But the Prime Minister disagreed, and called it a “triumph” instead.

”To have a pipeline will decrease the Estonian and Baltic dependence on Russian gas, because it is not possible to ‘switch off’ the supply on technical or political reasons. That is a step forward for us,” Rõivas said.

The Finnish government also presented the agreement as a win for the country.

“I am very satisfied that we have reached an agreement. With the implementation of the planned measures, Finland will become integrated into the European gas network and be able to improve the country’s gas-based energy security,” Stubb said.

Together with the two terminals, the total cost of the project is projected at around 500 million euros.