President Donald Trump on Wednesday said it was "insane" that reports about the Afghanistan reconstruction effort were released to the public.

Doing so allowed the enemy to see the reports, he said.

The US has appropriated nearly $130 billion to that reconstruction effort since 2002.

At the White House on Wednesday, President Donald Trump expressed intense dismay about ongoing oversight provided by the Special Inspector General for Afghanistan Reconstruction, the US government's main watchdog for the 17-year-long effort to rebuild the country.

Asked about reported efforts to withdraw US troops from Syria and Afghanistan, Trump, seated next to new acting Secretary of Defense Patrick Shanahan, criticized the transparency provided by SIGAR reports.

"One of the things I've told the secretary and other people, we do these reports on our military, some [inspector general] goes over there — who [are] mostly appointed by President Obama, but we'll have ours too — and he goes over there, and they do a report telling every single thing that's happening, and they release it to the public. What kind of stuff is this?" Trump said.

A US Marine with Task Force Southwest patrols through a village near Bost Kalay, Afghanistan. US Marine Corps

"We're fighting wars, and they're doing reports and releasing it to the public. Now the public means the enemy. The enemy reads those reports. They study every line of it," Trump added. "Those reports should be private reports. Let them do a report, but they should be private reports and be locked up, and if a member of Congress wants to see it he can go in and read."

"For these reports to [released], to [be given out] essentially, forget about [the public], given out to the enemy is insane," Trump said. "And I don't want it to happen anymore, Mr. Secretary. You understand that?"

Read more: Trump says 'the generals' asked for more time in Syria, but he said 'Nope' because 'We've knocked them silly'

Trump then said that "nobody" had been more critical of the US-led war in Afghanistan. "Hey, it's not my fault. I didn't put us there," he said. "But we're getting out and we're getting out smart, and we're winning."

Trump's sudden announcement last month that he would pull US forces from Syria was greeted with concern even by opponents of a protected US presence there, many of whom viewed Trump's move as hasty. The move also led Jim Mattis to resign as defense secretary.

A Fallen Soldier Tribute at the Utah Army National Guard recruiting building in Draper, Utah, November 4, 2018. Francisco Kjolseth/The Salt Lake Tribune via AP

Trump's announcement about withdrawing from Syria was followed by reports that the White House planned to start withdrawing from Afghanistan, pulling out half of the roughly 14,000 US troops there. Those reports also caused concern, especially among countries bordering Afghanistan, who fear the US withdraw could trigger new waves of migration.

Trump stressed Wednesday that withdrawals would come "over a period of time."

"I never said I'm getting out tomorrow. I said we're pulling our soldiers out, and they will be pulled back in Syria," he said. "We're getting out of Syria, yeah, absolutely, but we're getting out very powerfully."

Read more: Trump says he has 'no plans at all' to withdraw US troops from Iraq during his first visit to troops in a combat zone

SIGAR was created by Congress in 2008 to "conduct robust, independent, and objective oversight of the US reconstruction investment in Afghanistan."

Since 2002, approximately $126.3 billion has been appropriated for relief and reconstruction in the country, which the US invaded in late 2001 after the September 11 terrorist attacks.

That money has been used to develop Afghan security forces, promote good governance, assist development, and support counternarcotics and anti-corruption efforts.

Air Force pararescuemen work with members of Army Task Force Brawler, flying a CH-47F Chinook, during exfiltration after the completion of a training exercise at Bagram Airfield, Afghanistan, March 14, 2018. U.S. Air Force Photo by Tech. Sgt. Gregory Brook

SIGAR has revealed a wide array of waste and abuse, however.

Its findings include $86 million spent over seven years to develop a counternarcotics plane that "missed every delivery deadline and remained inoperable," $3 million spent on a cancelled request for boats to patrol rivers in the landlocked country, $6.5 million spent on six communications towers that were never used, and that an "unacceptably high" number of Afghan soldiers and police brought to the US for training go absent without leave.

Read more: 'We can do better': The Navy's newest fleet commander says US ships and sailors got 'beat up' during NATO's biggest exercise since the Cold War

SIGAR probes also found that the US Army refused to bar individuals and groups with alleged ties to terrorist groups from getting US contracts and that USAID and the State and Defense departments had "not adequately assessed their efforts to support education in Afghanistan" despite spending $760 million on them between 2002 and 2014.

SIGAR also reported at the end of 2016 that there had been increases in poverty, unemployment and underemployment, violence, outmigration, internal displacement, and the education-gender gap, and that services and private investment had fallen, while the share of the country controlled by the Afghan government also declined.