By Gregor Stuart Hunter 

China's shares seesawed in volatile trade on Tuesday, while markets elsewhere in Asia made modest gains as investors push off concerns about a default in Greece until the outcome of a referendum next Sunday.

The Shanghai Composite Index fell as much as 5.1% before recovering to close the morning session flat. The bumpy trading comes a day after a selloff that thrust the benchmark into a bear market, defined as a loss of more than 20% from its high reached on June 12.

Chinese authorities have tried to draw a line under the declines. The central bank cut interest rates over the weekend and late Monday the Finance Ministry announced that the state's pension fund could be allowed to invest up to 30% of its net asset value in securities.

The smaller Shenzhen market fell 2.2% after falling more than 6% earlier Tuesday. The ChiNext board, which is composed of small-cap companies, fell 0.6%, recovering from earlier losses of 7.6%. The board has lost more than a third of its value from its peak earlier this month.

With investor confidence likely to remain fragile, ING said investors should watch for weakness in China spilling over into other markets.

"Controls on capital flows insulate China's financial markets from contagion due to volatility in global financial markets," analysts from ING wrote in a research note. "The controls don't insulate global financial markets from contagion emanating from China."

Hong Kong's Hang Seng Index is up 1.2%, while listings of Chinese companies, known as H-shares, rose 2.1%.

Japan's Nikkei 225 Stock Average rose 0.3% in midmorning trading while the S&P/ASX 200 index slipped 0.2% as the effects of a market rout in the U.S., with the S&P 500 sinking 2.1%, seemed to abate.

"It might be tempting to call today's movement a 'dead-cat bounce,' in light of the fact that overall 'risk-off' investing conditions have not changed much," said Yutaka Miura, a senior technical analyst at Mizuho Securities. "Japan shares are in the unenviable position time-wise to absorb the Greek news shock first, and then the overseas reaction, resulting in a 'double-whammy' effect. But the situation in Europe may not gain any clarity until Greece holds its referendum this weekend" on whether or not to accept conditions for another bailout, he said.

The euro recovered slightly from a selloff on Monday, rising 0.2% to 1.1189 against the dollar even as Greece looks set to default on its payment to the International Monetary Fund due Tuesday. The currency fell 0.5% against the Japanese yen in Asian trade as investors seek safer assets.

The Malaysian ringgit hit its weakest level in more than a decade earlier Tuesday, falling to a fresh low of 3.7855 against the dollar.

Commodity markets slipped, with gold prices sliding 0.2% to $1,177.10 per troy ounce, while Brent crude futures decreased 0.1% to $61.93 per barrel.

Anjani Trivedi, Bradford Frischkorn and Rebecca Howard contributed to this article.

Write to Gregor Stuart Hunter at gregor.hunter@wsj.com