Washington: A group claiming to be hackers from Iran breached the website of a little-known US government agency on Saturday and posted messages vowing revenge for Washington's killing of top military commander Qasem Soleimani.

The website of the Federal Depository Library Program was replaced with a page titled "Iranian Hackers!" that displayed images of Iran's supreme leader Ayatollah Ali Khamenei and the Iranian flag.

"Martyrdom was (Soleimani's)... reward for years of implacable efforts," read a graphic depicting US President Donald Trump being punched by a first emanating from Iran as missiles fly by.

"With his departure and with God's power, his work and path will not cease and severe revenge awaits those criminals who have tainted their filthy hands with his blood and blood of the other martyrs," it said.

"This is only small part of Iran's cyber ability !" another caption on the page read in white text on a black background.

The killing of Soleimani in a drone strike in Iraq early Friday brought a furious vow of revenge from Tehran.

Described as the second most powerful man in Iran, Soleimani oversaw wide-ranging interventions in regional power struggles.

Trump has said Soleimani was planning an "imminent" attack on US personnel in Baghdad.

The president has warned that Washington is targeting 52 sites in Iran and will hit them "very fast and very hard" if the Islamic republic attacks American personnel or assets.