* Parliament approves disputed media law, EU disappointed
* PM says he "ashamed" of vote
* Government will sent code back to lawmakers for a third vote (Adds Kosovo PM reaction)
By Fatos Bytyci
PRISTINA, June 22 (Reuters) - Kosovo's justice minister and deputy prime minister, Hajredin Kuci, resigned on Friday after parliament passed a new penal code including two articles the European Union says will undermine the freedom of the press.
The disputed articles force journalists to reveal their sources and make defamation a criminal offence.
Parliament approved the code in late April but President Atifete Jahjaga rejected it and returned it to parliament for a second vote but lawmakers again voted on Friday in favour of keeping both articles.
Prime Minister Hashim Thaci said he was ashamed of parliament's decision and would send the code back for a third vote, without the disputed articles.
Members of his own party voted against removing the articles, which had been backed by the opposition.
Thaci told an urgent cabinet meeting he could not "agree with the laws and codes that create fear among free media".
Kuci, who has been Thaci's closest ally since Kosovo declared independence from Serbia in 2008, told a news conference: "I can inform you that from this moment I have offered my resignation to the prime minister."
Kosovo has faced steady criticism from international bodies for not doing enough to protect journalists and the freedom of the press. Almost all Balkan countries have abolished laws that penalise journalists for what they write and report.
The European Union representative in Kosovo said he was disappointed with parliament's decision.
"It is unfortunate that such a decision was taken despite continuous advice from the European Union that these articles are in contradiction with EU conventions ... that protect the freedom of speech and the freedom of media," Samuel Zbogar, the EU representative in Kosovo said in a statement.
Reporting by Fatos Bytyci; Editing by Zoran Radosavljevic and Alison Williams