Pvt. Shane Diaz of the U.S. Army’s 2nd Infantry Division goes through a chemical-weapons training exercise at Camp Mobile in South Korea. (Shin Woong-jae/For The Washington Post)

Inside a dark chemistry lab in a derelict old building, Pvt. Shane Diaz gingerly drew 13 milli­liters of an unknown brown liquid from a glass flask up into a syringe.

Breathing through a gas mask that made him sound like Darth Vader, he was careful not to spill a drop as he put it into a sample jar. Who knew what chemical weapons the North Koreans had been making here?

“Remove the tubing from the syringe and be mindful of the needle — it might come out,” Sgt. Tyler Lawrence said from behind him. “And when you get the tubing out, kill it.”

Everything had to be done exactly by the book. These samples could be used to prosecute Kim Jong Un and his cronies with war crimes before the International Criminal Court. Or, at least, that’s what the American soldiers were training for.

The U.S. and South Korean militaries are staging their ­largest-ever joint military drills, an eight-week exercise involving everything from amphibious landing exercises on southern beaches to computer-simulated “decapitation strikes” aimed at taking out the leaders of a certain regime just to the north.

About 17,000 American troops and 300,000 South Korean ­personnel are taking part in ­computer-simulated exercises, which end this weekend, and field drills that continue through the end of April.

The allies’ scenario is clear: to prepare to go into North Korea after the regime in Pyongyang collapses or after it orders a suicidal invasion of the South.

The exercises come at a particularly tense time on the Korean Peninsula, with international sanctions — punishment for the North’s recent nuclear test and missile launch — biting at the same time.

Pyongyang has been making its unhappiness with both developments loud and clear, threatening preemptive strikes or claiming some major technological advance on a daily basis.

“The DPRK’s army will reduce all bases and strongholds of the U.S. and south Korean warmongers for provocation and aggression into ashes in a moment, without giving them any breathing spell,” the state-run Korean Central News Agency said in a recent commentary about the exercises, using the official abbreviation for North Korea.

While North Korea has been threatening to use its nuclear weapons, a key component of the drills involves dealing with chemical or biological agents. About 700 soldiers, 100 of them South Korean, are taking part in a series of 28 drills over 18 days.

In addition to its nuclear weapons program, the Kim regime is thought to possess chemical weapons, including nerve agents such as sarin gas that it can make domestically.

Evidence suggests that North Korea has “significant quantities and varieties of chemical weapons,” Joseph S. Bermudez, an expert on North Korea’s defense, wrote in a 2013 analysis. “It also has, to a lesser extent, the ability to employ these weapons worldwide using unconventional methods of delivery.”

The use of chemical weapons in Syria’s civil war has shown how devastating this form of warfare can be and has refocused some attention on the North’s presumed programs.

At a largely unused army base north of Seoul, close to the demilitarized zone separating the two Koreas, soldiers were practicing what to do if they came across a clandestine chemical weapons lab in North Korea.

At a drill Monday, soldiers in full combat gear from an Army unit based at Fort Hood, Tex., stormed the dilapidated building, chosen because it was ­similar to what American soldiers might actually encounter in North Korea, and swept through the dark rooms, guns drawn.

In the building, they found 55-gallon drums with liquid on top, empty munitions shells and a filling station, a chemical lab with a sign reading “quality inspection” in Korean on the outside. A sharp odor pervaded the space (it was Bengay that the soldiers had smeared on the walls for verisimilitude).

“It’s more real here for sure. It’s a real-life scenario,” said 1st Lt. Jonathan O’Connell, who had come in from Fort Hood for the exercises. “There are multiple known sites that are literally hours away from here by foot.”

Seeing it was clearly a chemical weapons site, the soldiers called in specialists from the U.S. Army’s 2nd Infantry Division, the only division with a full chemical battalion and the only chemical weapons team stationed outside the United States.

Enter Pvt. Orin Johnson, the team leader, with his notebooks and camera; Pvt. Charles Kimiaga, with a bucket filled with plastic sheeting and glass jars; and Diaz with a scanner that started beeping immediately.

They were decked out in “Mopp 4” gear, the highest level of protective suits, with gloves and boot covers taped onto their suits.

Under the close inspection of Lawrence, their evaluator, the three slowly moved through the rooms with their vapor detector, radioing in their findings along the way. It looked like a cross between “CSI” and “Breaking Bad.”

“Our guys need to be able to identify what’s going on and understand what’s on the site and understand what’s there,” said Lt. Col. Adam Hilburgh, the battalion commander. “We use the current intelligence picture to tailor our training to that.”

If they were to actually find chemical or biological agents in North Korea, the soldiers would have to take samples and keep them secure so they could be introduced at the International Criminal Court, Hilburgh said.

In the chemical lab, Lawrence told the men to get out their “kill bucket.” They promptly set up a yellow bucket bag and poured in powder to kill whatever liquid was inside the flasks.

Lawrence was not impressed with the time it was taking. “The [chemical] process is still ongoing,” he barked. “You’re assisting the enemy.”

The trio set about putting samples into glass jars — 10 milliliters, or about two teaspoons, was all the court would need, Lawrence said — and analyzing them in the scanner.

It turned out it was lewisite, a blister agent. (Anti-lewisite pills were found in another room, along with the supposed North Korean gas masks.)

The soldiers prepared to package it up and ship out the liquids before moving steadily up the difficulty ladder.

Next on their training list: going underground to practice working in tunnels containing radioactive material — and very little oxygen.