(Updates prices and adds details)
SHANGHAI, Oct 29 (Reuters) - China's yuan gave up earlier gains and ended domestic trading at a near two-week low against dollar on Friday, as major state-owned banks bought the greenback.
The onshore yuan opened at 6.3918 per dollar and finished the domestic session at 6.4009, 91 pips weaker than previous late night session, the softest such close since Oct. 18.
State-run banks, which have in the past stepped in to trade on behalf of the monetary authorities, were seen buying large amounts of dollars in late trading on Friday, seven sources told Reuters. The were also seen buying dollars on Thursday.
While it could not be ascertained if this dollar buying was for their client needs or to cap a rising yuan, the sources said the volume and pattern of purchases suggested its was aimed at curbing the curbing the yuan.
The yuan's domestic closing price could affect the following day's official midpoint fixing, and the spot market is only allowed to trade within a narrow band of 2% on either side of that day's guidance rate.
Despite the state bank actions, the Chinese currency remained on course for its biggest monthly gain to the dollar since May.
The yuan's value against its major trading partners has also risen 0.6% to 100.23 on Friday, from 99.64 at end-September, according to Reuters calculation based on official data.
Prior to market opening, the People's Bank of China (PBOC) set the midpoint rate at 6.3907 per dollar, 50 pips firmer than the previous fix of 6.3957.
Separately, currency traders said markets remain focused on policy meetings of the Federal Reserve and Bank of England next week for clues on the timing of rate tightening in major economies.
The Fed is widely expected to begin tapering its stimulus from next month, with interest rate lift-off following next year.
A trader at a foreign bank said the market was wary of state bank actions, although he is still not ruling out the yuan testing 6.35 in the near term, its loftiest level this year.
"As the Thanksgiving and Christmas seasons are approaching in the fourth quarter, China's export orders will remain strong, but they will also be subject to the fragile global supply chain," China Construction Bank said in a note, adding that heavy foreign inflows were among factors supporting the yuan.
Chinese government bonds are set to be included in the FTSE Russell flagship World Government Bond Index (WGBI) from Friday, a move that is expected to attract more foreign capital inflows and support the Chinese currency over the long run.
Reporting by the Shanghai and Beijing Newsroom; Editing by Shri Navaratnam & Simon Cameron-Moore