The Republic of San Marino, a tiny microstate on the Italian peninsula, has legalized civil unions. The status will be available to both straight and gay couples.

The Great and General Council voted 40 to 4 to pass the Regulation of Civil Unions law. Four representatives abstained.

It’s quite a leap for the tiny country. Until six years ago, the country had a law forbidding same-sex couples from living together.

It took lawmakers almost a year to pass the bill after introduction and legislative wrangling. The date of implementation isn’t clear.

San Marino is the oldest republic in the world; it was founded in AD 301. The country’s constitution was written in the 16th century and is still in effect.

The extremely wealthy country has the smallest population of all European countries.