Unidentified hackers broke into several hundred Lithuanian Web sites over the weekend, plastering them with communist symbols, government officials said Monday.

The hackers posted Soviet symbols — the hammer and sickle, as well as the five-pointed star — and scathing messages with profanities on Web sites based in the ex-Soviet nation, officials said.

"More than 300 private and official sites were attacked from so-called proxy servers located in territories east of Lithuania," said Sigitas Jurkevicius, a computer specialist at Lithuania's communications authority.

• Click here to visit FOXNews.com's Cybersecurity Center.

The hackers hit Web sites from both the government and private sector, including the Baltic state's securities commission and ruling Social Democratic Party. Others included a car dealership and a grocery chain.

Many believe the attacks were a backlash against legislation approved by lawmakers two weeks ago banning the public display of Soviet and communist symbols. President Valdas Adamkus signed the law Friday.

Lithuania and the other two Baltic countries, Estonian and Latvia, gained independence from the Soviet Union in 1991.

The law prohibits the public display of the Soviet flag, military uniforms and the five-pointed Soviet star, as well as the playing of the Soviet national anthem.

It has drawn strong condemnation from Moscow, but Lithuanian officials stopped short of pinning blame on Russian hackers.

"Lithuania has experienced a serious attack on the Internet resources. I cannot rule out there is a direct link with our recent legislation," Defense Minister Juozas Olekas told reporters.

The hacking incident was also reminiscent of a series of cyberattacks on Estonian Web sites last year after the neighboring Baltic state angered Russia by moving a Soviet war monument and nearby war grave.