* Public debt ratio at 61 percent of GDP (Recasts, with new details throughout)

By Ho Binh Minh and My Pham

HANOI, Oct 20 (Reuters) - Vietnam’s economy will grow at its quickest rate since 2010 at over 6.5 percent this year and has succeeded in controlling inflation and a troublesome blight of bad debts, its prime minister said on Tuesday.

A U.S.-led Trans Pacific Partnership trade deal agreed last month covering 40 percent of global gross domestic product could be signed later this year or early 2016, and may take effect as early as the end of 2017, Nguyen Tan Dung told the national assembly.

Vietnam’s economy, among only a few strong performers in Asia, has been supported by robust exports, solid growth in manufacturing - mostly electronics and textiles - and forecast record foreign investment, boosted by its expected accession to the TPP and other trade pacts.

Dung’s address focused on the clean bill of health for the economy and comes at a crucial time, three months away from a leadership change in the ruling Communist Party in which he is expected to figure prominently.

It follows a rush of reforms in recent months favourable to foreign business, from more liberal regulations in real estate, equities and immigration to proposed state divestments and an easing of many restrictions in investments.

“Looking back at the past five years, although facing many difficulties, weaknesses and limits, we have generally reached targets,” Dung said in the televised speech.

Dung said the economy is projected to expand 6.7 percent in 2016 and grow an average 6.5-7 percent until 2020. Inflation would be at 2 percent this year and kept below 5 percent in 2016, he said.

It marks a sharp turnaround from a few years ago, when Dung’s government came under scrutiny for an economy in which inflation and bad debt spiralled out of control.

Bad debts accounted for 2.9 percent of loans in September, down from a troublesome 17.23 percent in 2012, he said. Credit growth this year could reach 17 percent, the fastest in four years, compared to 14.16 percent growth in 2014.

Dung said foreign direct investment recorded from 2011 to the end of this year could surpass $58 billion, on top of an anticipated $24 billion in foreign development aid during the same period.

His address also touched on Vietnam’s debt vulnerability. Dung said foreign debt at the end 2014 likely accounted for 41.5 percent of gross domestic product, and public debt was at 61.3 percent of GDP, both within limits set by the legislature. (Writing by Mai Nguyen; Editing by Martin Petty & Shri Navaratnam)