In the face of Afghanistan’s unprecedented boom in opium production, neighboring Iran is trying to baton down its border to slow down smuggling, building moats, walls and other large-scale projects.

Iran spent more than $26 million last year alone on the border projects, which also include large embankments, new border posts and lengths of barbed wire along parts of its 2,000-kilometer (1,200-mile) border with Afghanistan and Pakistan.

“The transit of narcotics is a complicated issue. Smugglers are wealthy. They change tactics and use modern equipment that makes it more and more difficult to discover. We need new, modern equipment to combat drugs effectively,” Gen. Ali Moayedi, Iran’s anti-narcotics police chief, said during a recent tour of the border.

Neighboring Afghanistan has all the makings of a narco-state and is the main source of drugs coming into Iran and headed to other markets in Europe and the United States.

Last year, 209,000 hectares (806 square miles) of poppies were planted across Afghanistan, up 36 percent over the year before. They produced an estimated 5,500 metric tons (6,062 tons) of opium, according to the United Nations drug agency. By comparison, only a little over 7,000 hectares (27 square miles) of poppy field were eradicated.

The 2014 harvest is expected to match or even exceed last year’s record. In coming years, opium will grab an even larger share of Afghanistan’s already troubled economy, as money from U.S. military contracts and aid work dries up. The U.N. estimates that some 200,000 families in Afghanistan are involved in opium production already and that the country has some 1 million addicts.

As a share of Afghanistan’s economy, opium looms large: The U.N. estimates the potential gross value of Afghan opiates last year was around $3 billion — equal to 15 percent of the country’s gross domestic product.

The tour, including Tehran-based diplomats from 14 countries and the U.N., was part of an effort by Iran to demonstrate the effort it is making in the fight against drug smuggling.

Iran lies on a major drug route between Afghanistan, Europe and Gulf states. Every year, it burns about 100 tons of seized narcotics as a symbol of its determination to fight drugs.

Gen. Mohammad Kazem Taqavi, the local border police chief, said his forces clashed with armed drug smugglers the day before the tour in this border town.

“Some 50 kilograms (110 pounds) of narcotics were seized, one of the smugglers was killed and their weapons and equipment were confiscated,” he said.

In the past 30 years, 3,734 Iranian border guards have been killed and more than 12,000 wounded in clashes with smugglers.

The U.N. provided special equipment to Iran to detect drugs hidden in tight and closed spaces like a vehicle’s fuel tank.

Taqavi said more equipment was needed, along with more international help.

Iran has also complained that it is being accused of violating human rights by hanging convicted drug smugglers, who make up 73 percent of those executed annually in Iran. Some Iranian officials have suggested that the Islamic Republic should allow transit of narcotics through its territory if it is going to be criticized for hanging convicted drug smugglers

“It’s against Islamic teachings and our policy to allow transit of illicit drugs through our territory. We will continue to fight drug smuggling even if there is no global contribution,” he said.

Friedrich Stift, the Austrian ambassador, acknowledged there was a lack of support but said the political climate had changed after moderate President Hassan Rouhani took office last year.

“Iran is protecting its own population by combating drug trafficking. However, it is indirectly doing the job for us. We appreciate Iran’s efforts,” he said. “With change of political climate, the way is being paved for greater global contribution to Iran’s fight against narcotics.”