(Correct typo in name in 12th paragraph)
* China GDP above growth target in run-up to leadership meeting
* Strong economy gives leadership room to focus on debt risks
* Strong boost from exports could risk trade tensions with U.S.
* Data keeps global stocks near record highs
BEIJING, July 17 (Reuters) - China's economy expanded faster-than-expected in the second quarter, setting the country on course to comfortably meet its 2017 growth target and giving policymakers room to tackle big economic challenges ahead of key leadership changes later this year.
The boost to growth was in part driven by firmer exports and production, in particular steel, which could heighten trade tensions as the United States and China begin economic talks this week. U.S. President Donald Trump has made the U.S. trade deficit with China a top agenda item in bilateral talks and has also flagged the steel trade as a point of contention.
China's gross domestic product rose 6.9 percent in the second quarter from a year earlier, the same rate as the first quarter, the National Bureau of Statistics said on Monday. That was higher than analysts' expectations of a 6.8 percent expansion.
Economic data from the second quarter has prompted a number of analysts to upgrade their GDP forecasts for China for 2017, although some moderation in growth is expected later this year as policymakers' efforts to rein in property and debt risks weigh on activity.
"In general, we expect GDP growth to remain robust in the second half but slower than the first half, due to the high base," Citi economists said in a research note. "Looking ahead, uncertainty remains on investment and trade."
The bank has raised its 2017 annual GDP projection to 6.8 percent on-year from 6.6 percent previously.
The robust numbers kept world shares near a record high and briefly helped China's major stock indexes recoup earlier losses.
The second quarter numbers put the economy on a strong footing to meet China's growth target of around 6.5 percent in 2017, which would give policymakers room to defuse financial risks.
While growth in the high-flying property sector has cooled this year, a rebound in exports after several years of decline has helped prevent any broader slowdown in China's economy.
Retail spending and factory output were also bright spots in the first half. Retail sales growth picked up to 10.8 percent in the second quarter from 10.0 percent in the first quarter, a Reuters calculation based on official data showed.
Factory output also picked up in the second quarter, though the 6.9 percent growth for the first half was only a slight pickup from recent quarters.
The improving economy is no doubt welcome news ahead of an autumn congress of the ruling Communist Party of China, at which President Xi Jinping is widely expected to tighten his grip on power, with leadership keen to ensure a smooth run-up to the meetings.
A consolidation of power could give Xi more clout to push through what analysts say are long overdue but painful reforms such as restructuring massive state firm debt. The president said at the National Financial Work Conference on the weekend he wanted to give China's central bank a bigger role in dealing with risks in the financial system.
With risks rising in some parts of the economy due to leveraged investments and over-borrowing, officials need to carefully balance support for growth with risk controls.
However, analysts say the central bank is likely to sit tight for now.
"Based on this data, there is no need for easing and no need really for tightening either because inflationary pressures are very much contained. So I think the PBOC (People's Bank of China) just continues to be watchful," said Craig James, chief economist for Commonwealth Securities in Sydney.
The stronger growth also means officials will have more room to address the growing debt problem, as China continues to place controlling risk and deleveraging at the forefront of financial policy this year.
The PBOC shifted to a modest tightening bias at the start of this year, guiding market interest rates higher during the first quarter, including immediately after the U.S. Federal Reserve raised rates in March.
"Overall, China's Q2 economic performance provides a favourable backdrop for the authorities to push forward with their structural reforms, including those highlighted at the National Financial Work Conference held over the weekend," ANZ Bank economists said in a note.
Net exports' contribution to China's GDP growth in the first half of the year was 3.9 percent, a significant improvement from the same period last year, when net exports were a 10.4 percent drag on growth.
With China and the United States set to begin economic talks on Wednesday, simmering trade tensions are sure to be a major topic and firm Chinese export numbers will certainly keep the point of contention elevated.
Trump has described the trade imbalances between the two countries as a "very, very big issue" that he would address.
The surplus with the United States was $25.4 billion in June, up from $22.0 billion in May, official data showed last week, and its widest since October 2015, according to a Reuters calculation.
Meanwhile, data on Monday, which showed China's steel output hit a record in June, comes amid an investigation by the Trump administration into China's exports of steel and other metals.
(Reporting by Kevin Yao; Additional reporting by Swati Pandey in Sydney; Writing by Elias Glenn; Editing by Sam Holmes)