The US and Israel simulated rocket attacks during their largest-ever joint military drill Wednesday, while real missiles fired from Gaza exploded in southern Israel.

US military officials noted that the joint exercise, called Austere Challenge 12, was planned long before the latest flare-up between Israel and Hamas-ruled Gaza and a long-running debate over how to deal with Iran, and said it was unrelated to specific threats facing Israel.

It comes at a time when Israel and the US have openly debated the merits of a strike on Iran’s nuclear facilities, and as US support for Israel has emerged as a central issue in the upcoming American presidential elections.

In this week’s presidential debate, President Barack Obama cited the joint drill, calling it a testament to the strong military cooperation between the two countries. Presidential contender Mitt Romney has claimed that the Obama administration has undermined Israel as it faces threats from Iran and Arab countries.

About 1,000 troops brought in from the US are in Israel alongside a similar number of Israeli troops. An additional 2,500 US troops, based in Europe and the Mediterranean, are participating in the drill. The armies say they are practicing their ability to work together to thwart a variety of threats that face Israel. The exercise will continue for about three weeks.

“Make no mistake. The US is 100 percent committed to the security of Israel. That commitment drives this exercise,” said US Air Force Lt. Gen. Craig Franklin in a news conference at a training site near a beach in the Tel Aviv area.

Air defense commander Brig. Gen. Shachar Shochat lauded Israel’s air defense system for being the most advanced and sophisticated in the world.

Reporters were invited to view a large parking lot near the beach where large camouflage-colored trucks and a Patriot air defense battery launcher were deployed for Wednesday’s exercise simulating incoming rockets. In that simulation, Israeli commanders and their American counterparts identified an incoming rocket or enemy aircraft, then American troops pushed the button to activate the anti-missile launcher.

Not far away, Israeli soldiers were operating similar batteries for real, as Gaza militants fired dozens of rockets at southern Israel. The locally made “Iron Dome” system knocked down eight rockets from Gaza, Israeli officials said Wednesday.

Also this week, US soldiers said they practiced a response to a chemical and biological attack on a joint Israeli-American military convoy. In that exercise, soldiers rubbed a charcoal-like substance to decontaminate the imagined chemical and biological byproducts from army vehicles and personnel.

Sgt. Gary Sabby, 26, from St. Paul, Minnesota, said he played a 47-year-old male suffering a seizure from the attack. He rolled up the sleeve of his camouflaged military fatigues to reveal the pinprick — above a large tattoo of a bear — where soldiers stuck him with an IV needle.

“If something ever did happen, we could come together,” said Specialist Brandon Maroney, 23, from Dallas, Texas. “This joint exercise validated that we can work together.”