The Local reported that anyone trying to access the sites got a short message: "Due to technical problems the Web sites www.regeringen.se and www.sweden.gov.se are not available."
Anonymous claimed responsibility for the sabotage on Twitter.
The two Web sites became available again about noon, although access to both was slow and uncertain. Anonymous sent out more tweets asking sympathizers to help overload the sites.
Anonymous's best-known action was Operation Avenge Assange in 2010. The group attacked PayPal, MasterCard and Visa for freezing the accounts of WikiLeaks, the whistle-blowing online organization founded by Julian Assange.
In recent days, the group has attacked sites operated by the Boston Police Department and the Greek Finance Ministry.
LGBT community has 'bullied the American people': Bachmann
Astronomers offer more expansive view of universe