European shares rallied in tandem with other risk assets on Wednesday after leading central banks announced joint action to inject liquidity into financial markets strained by the euro zone's debt crisis.

Banks and other cyclical stocks were among the top gainers, with the STOXX Europe 600 Banks index <.SX7P> and Basic Resources index <.SXPP> both up more than 4 percent by the close.

Driving the move was a coordinated move by the U.S. Federal Reserve, the European Central Bank and the central banks of Canada, Britain, Japan and Switzerland to lower the cost of existing dollar swap lines to prevent a liquidity squeeze.

It gives an indication that monetary authorities are prepared to do what is required to stop a freeze-up in the funding markets, Michael Hewson, market analyst at CMC Market, said.

As a result, the FTSEurofirst 300 <.FTEU3> index of top European shares provisionally closed 3.3 percent higher at 979.5 points. It had begun recovering earlier losses after China moved to ease bank reserve ratios for the first time in nearly three years to shore up its economy.

(Reporting By Francesco Canepa)