MOSCOW, April 22 (Reuters) - Any move by the United States to seize frozen Russian assets would be illegal, set a dangerous precedent and be challenged in court, the Kremlin said on Monday, promising that it would retaliate.

The U.S. House of Representatives on Saturday passed a $95 billion legislative package providing security assistance to Ukraine, Israel and Taiwan that included a measure for the potential transfer of seized Russian assets to Ukraine.

Meanwhile, the Group of Seven (G7) major powers are discussing the possibility of using some $300 billion of sovereign Russian assets, frozen in the West, to help fund support for Ukraine.

"This is a breakdown of all foundations of the economic system," Kremlin spokesman Dmitry Peskov told reporters. "It is an encroachment on both state holdings and private property. These are illegal actions."

He said there would be some kind of retaliation and legal action, without going into details.

"If such measures are implemented, many countries and investors will think 10 times before investing in the U.S. economy or keeping their holdings there," Peskov said.

A top Russian lawmaker on Monday said Russia now has grounds to

confiscate

Western assets after the U.S. legislation was passed. Moscow has already placed some Western assets under temporary management and forced scores of asset transfers from foreign to domestic buyers at discounts of at least 50%. (Reporting by Reuters; Writing by Alexander Marrow; Editing by Mark Trevelyan)