Turkey’s parliament has approved Sweden’s accession to NATO after months of deliberations, leaving Hungary as the lone holdout to the defense alliance’s northern enlargement.

The parliament plenary in Ankara voted 287 to 55 to accept Sweden’s application on Tuesday, sending the document back to President Recep Tayyip Erdogan for a final signoff before it can be deposited with the US State Department in Washington. Erdogan has already backed Sweden’s membership and is widely expected to sign.

The move puts Sweden on the cusp of realizing its goal of becoming the 32nd member of the North Atlantic Treaty Organization, a year and eight months after putting in an application that marked a turnaround in its defense policy. Moving in lockstep with neighboring Finland, Stockholm concluded in May 2022 that entering the alliance would be the best way to deter any aggression from Russia following the invasion of Ukraine. Finland joined NATO in April.