ASTANA (Reuters) -- Kazakhstan has approved a bill introducing tougher punishment for invasion of privacy in a move condemned by the opposition as an attack on press freedom.

Democracy, media freedom, and human rights are under intense scrutiny in Kazakhstan as the Central Asian state prepares to take the helm of the Organization for Security and Cooperation in Europe (OSCE) in 2010.

Kazakhstan's upper house of parliament approved the bill unanimously. President Nursultan Nazarbaev now needs to sign it into law -- largely a formality.

Nazarbaev's opponents have said that the new law, which introduces jail terms for crimes against privacy, would further limit freedom of speech in a country where mainstream media never criticize the president.

"This is yet another attempt to shut everyone up," opposition leader Zharmakhan Tuyakbai said last week commenting on the draft law.

International rights groups say Kazakhstan, a former Soviet republic that has never held elections judged free and fair by the OSCE itself, has not fulfilled its promises to bring more democracy and continued to crack down on political dissent.

The government has rejected accusations of intolerance to dissent and biased trials against its critics.

Adil Soz, a media rights group, urged parliament last month to reject the latest draft, saying it was too tough and would give the authorities an excuse to silence independent or investigative reporting.

The government says the law would help protect people's rights and curb crimes against privacy such as publishing data on people's savings or private correspondence without their consent.

The bill follows a series of leaks of what appears to be private conversations between former and current senior officials posted on various websites, including YouTube.

Earlier this year, Kazakhstan adopted a law allowing the government to block websites posting "illegal" information.