SHANGHAI (Reuters) - The yuan was little changed on Wednesday, hovering near its 5-1/2-year low against the dollar, after heavy dollar buying by banks' clients offset the central bank's stronger midpoint setting.

The People's Bank of China (PBOC) appeared to have remained on the sidelines in the morning, letting the market dollar demand keep the yuan soft, traders said.

"Dollar buying in the market was much stronger than in the past few days, which means clients were a bit panicky," said a trader at a Chinese commercial bank in Shanghai. "The Brexit aftermath is still reverberating."

Traders reported no sign of PBOC intervention and say the central bank is letting market forces play a bigger role in determining the yuan's value.

"Given that market expectations are now tilting towards yuan depreciation, the PBOC is quietly allowing the yuan to slide further as long as intraday swings do not get out of hand," said a dealer at another Chinese commercial bank in Shanghai.

Prior to market opening, the PBOC set the midpoint rate <CNY=SAEC> at 6.6324 per dollar, 0.31 percent firmer than the previous fix of 6.6528, ending a three-day string of weaker settings after the British vote to leave the European Union.

Spot yuan <CNY=CFXS> opened at 6.6426 per dollar and was changing hands at 6.6530 at midday, easing only 0.02 percent from the previous close and 206 pips softer than the midpoint. The currency was close to 6.6585, the lowest level since December 2010, that it touched on Monday.

Some traders said the over 200 pip gap between the spot yuan and the official guidance rate indicated the PBOC is tolerating the yuan's depreciation.

As of midday, the Chinese currency had weakened 1.1 percent in June. In May, it lost 1.5 percent, the second biggest monthly fall on record.

On June 26, Bank of America Merrill Lynch forecast that the yuan will weaken to 7.0 against the dollar by the end of this year.

On Wednesday, the offshore yuan was trading 0.36 percent softer than the onshore spot at 6.6772 per dollar.

(Reporting by the Shanghai Newsroom; Editing by Richard Borsuk)