A referendum on a law governing the Divača-Koper rail upgrade was held in Slovenia on 24 September 2017. The referendum was marked by a low turnout and the majority of voters voted in favor of the proposed law.
On 8 May 2017, the National Assembly of Slovenia passed a law that deals with the construction of the second railway track from Koper to Divača, in particular regarding the financial plans for the project. The second railway track should help the development of Port of Koper, a major port in the Northern Adriatic Sea, as the existing track was in bad condition and already nearing the traffic limits. The law was opposed by civil activist Vili Kovačič who, supported by several political parties and civil initiatives, called for a referendum to repeal the law. After collecting 40,000 voter signatures, the referendum was set to take place on 24 September 2017.
Per article 90 of the Constitution, 40,000 voters can require the National Assembly to call for a referendum to reject a law that was ratified by the Assembly. The law is rejected if a majority of voters who have cast valid votes vote against the law, provided at least one fifth of all qualified voters have voted against the law. A minimum of 20% of the voters (around 343,000 voters of about 1.7 million registered voters) are required to cast a valid "no" vote for the result of the referendum to be valid.
In the referendum campaign, both sides in principle agreed that the second track is required. Opinions differed on the details of the law. Among the concerns of the opponents were the alleged lack of transparency regarding the finances, questions regarding the proposed track route, and the involvement of Hungary as a potential partner in the construction project. Supporters of the law cited the already approved financial contribution of the EU, new job creation, the fact that the rejection of the law would result in the beginning of construction being delayed for several years, and the fact that the proposed route is optimal, based on a series of expert studies and agreed upon by all Slovenian cabinets since 2004. Among major political parties, the law was supported by the coalition partners Modern Centre Party and Social Democrats. DeSUS, also a coalition partner, remained neutral. Among the parties represented in the National Assembly, the law was opposed by the Slovenian Democratic Party, New Slovenia, and The Left. Numerous smaller political parties and civil initiatives took part in the referendum campaign on both sides.