NATO member Turkey has agreed to support Sweden and Finland’s membership of the alliance. It had initially opposed the Nordic countries’ bids to join. In a statement, NATO said, a trilateral deal had been reached at a meeting between Turkey’s President, Recep Tayyip Erdoğan, Finland’s President Sauli Niinistö and the Swedish Prime Minister Magdalena Andersson, in the Spanish capital, Madrid. Foreign Ministers from the three countries signed a joint security pact that addressed Turkey’s concerns.

NATO Chief Jens Stoltenberg said, Sweden agreed to step up its work on Turkish extradition requests of suspected militants. The two Nordic nations will also lift their restrictions on selling weapons to Turkey, he said.

Sweden and Finland had historically declined to seek Nato membership, partly because of mixed public opinion and caution around their security relationship with Russia. However, that dramatically changed after Russia launched an military opration on Ukraine in February.