Kosovo deputy prime minister Hajrudin Kuci resigned on Friday after the parliament adopted a new bill comprising two disputed provisions that critics say infringe media freedoms.
"I have said that I will offer my resignation if these two articles are again voted on in parliament," Kuci, who is also Kosovo's justice minister, told reporters.
The disputed articles in the new criminal code stipulates that journalists can be forced to disclose their sources if ordered by a court.
The code also includes an article that could see journalists jailed for up to three years if a court finds their reports led to criminal acts or are found to be defamation.
The parliament has already adopted the bill in April, but Kosovo president Atifete Jahjaga refused to sign it and asked the assembly to review the disputed provisions.
However the parliament on Friday voted to keep the two articles in the code.
After the vote, Kosovo prime minister Hashim Thaci said his cabinet would "urgently" propose a draft changing the penal code that would revoke the two disputed provisions.
International media watchdogs have also warned of a deterioration of the country's press freedom.
Werner Almhofer, head of the Organisation for Security and Cooperation in Europe mission in Kosovo, called on the assembly "to once again review these provisions and address concerns voiced by media freedom organisations and the media themselves".
"Those two articles in their present form undermine media freedom," Almhofer said.