The ‘yes' vote came despite a recommendation from the cantonal government that the move be rejected.
Extending paternity leave for civil servants would send the wrong message to private firms that can't afford to follow suit, the government had argued before the vote which was held outdoors during Glarus's traditional Landesgemeinde, or cantonal assembly.
But supporters of the move said young, modern families needed a longer paternity leave allowance. During discussions before the vote on a rainswept afternoon, they also noted that 11 Swiss cantons were already offering five days or move leave to new fathers.
“Let's send a positive message to the rest of Switzerland,” one green politician from the canton home to around 40,000 residents said.
The vote was extremely close, with the ballots having to be tallied up three times before the final positive result was known.
It came only a week after the Swiss parliament narrowly rejected a motion to grant fathers two weeks statutory paternity leave.
The vote was a blow to those who have long campaigned in favour of statutory paternity leave in Switzerland.
Switzerland currently has no statutory paternity leave, though fathers are allowed one or two ‘family days' for the birth of their child. Over the past few years several politicians and lobby groups have tried to put the issue on the political table, but to little effect.
In 2015, the group Travail.Suisse called for a minimum of 20 days paternity leave to be paid at 80 percent of normal pay.
And recently an advisory body on women's rights published a report calling for the government to introduce 24 weeks shared parental leave, with some of it reserved by law for fathers.
The Landesgemeinde tradition, once practiced across much of Switzerland now only exists at the cantonal level in Glarus and Appenzell Innerrhoden.