After hitting its weakest in nearly three years against the U.S. dollar, the Indonesian rupiah should stabilize from here on out, the country's trade minister told CNBC on Wednesday.

The rupiah is one of the worst-performing Asian currencies this year as investors flee emerging markets with current account and fiscal deficits. On Wednesday morning, one U.S. dollar bought around 14,640 rupiah — the Indonesian currency's weakest since October 2015 — compared to 13,565 rupiah at the start of 2018.

The U.S. Federal Reserve raising interest rates and some of President Donald Trump's policies have lifted the greenback, which attracted investors into the world's largest economy, Indonesian Trade Minister Enggartiasto Lukita told CNBC's Sri Jegarajah.

"This is good for the U.S. but it affects all countries," he said, adding that Indonesia will continue to use both monetary and fiscal policies to defend its currency from further weakening.

When the minister was asked whether he's confident those policies will stabilize the rupiah and prevent it from depreciating more, he responded: "Yes, I am."

Indonesian authorities have made saving the currency a priority. The country's central bank raised interest rates four times since May and has been tapping its foreign cash reserves to buy up the rupiah. The government also announced measures to take some pressure off its currency, including imposing tariffs on some imported goods that can be locally made.

The latter move aims to lower import demand, which reduces the need to sell the rupiah in exchange for foreign currencies. It will also help to contain Indonesia's current account deficit, a reason widely cited by many investors for taking their money out of the country.