(CNN) -- The crew members of a North Korean freighter regained control of their ship from pirates who hijacked the vessel off Somalia, but not without a deadly fight, the U.S. Navy reported Tuesday.
The USS James E. Williams ordered pirates to give up their weapons, the Navy says.
When the battle aboard the Dai Hong Dan was over, two pirates were dead and five were captured, the Navy said.
Three wounded crew members from the cargo ship were being treated aboard the guided-missile destroyer USS James E. Williams.
The captured pirates were being held aboard the North Korean vessel, the Navy said.
The bandits had seized the ship's bridge, while the crew kept control of the steering gear and engines, the Navy said.
The Koreans moved against the attackers after the Williams -- responding to reports of the hijacking -- ordered the pirates to give up their weapons, according to the Navy.
When the crew members stormed the bridge, the deadly battle began. After the crew regained control, Navy sailors boarded the Dai Hong Dan to help with the injured.
North Korea and the United States have no diplomatic relations. Watch why the U.S. helped the North Koreans »
The incident took place about 70 miles northeast of the Somali capital, Mogadishu, the Navy said.
It is the second incident of piracy reported in recent days. A second U.S. Navy destroyer was searching waters off Somalia for pirates who hijacked a Japanese-owned ship, military officials said.
Over the weekend, gunmen aboard two skiffs hijacked the Panamanian-flagged Golden Nori off the Socotra archipelago near the Horn of Africa, said Andrew Mwangura, a spokesman for the Kenyan-based Seafarers' Assistance Program.
The guided-missile destroyer USS Arleigh Burke has been pursuing the pirates after entering Somali waters with the permission of the troubled transitional government in Mogadishu, U.S. officials said Monday. In recent years, warships have stayed outside the 12-mile limit when chasing pirates.
Two military officials familiar with the details confirmed the ongoing operation.
The Navy's pursuit of the pirates began Sunday night when the Golden Nori radioed for help. The Burke's sister ship, the USS Porter, opened fire and sank the pirate skiffs tied to the Golden Nori's stern before the Burke took over shadowing the hijacked vessel.
When the shots were fired, it was not known the ship was filled with highly flammable benzene. U.S. military officials indicate there is a great deal of concern about the cargo because it is so sensitive.
Benzene, which U.S. authorities have declared a known human carcinogen, is used as a solvent and to make plastics and synthetic fabrics.
Four other ships in the region remain in pirate hands, the Navy said.
U.S. and NATO warships have been patrolling off the Horn of Africa for years in an effort to crack down on piracy off Somalia, where a U.N.-backed transitional government is struggling to restore order after 15 years of near-anarchy. See how piracy is worse than 2006 »
On Monday, the head of the transitional government resigned as his administration -- backed by Ethiopian troops -- battled insurgents from the Islamic movement that seized control of Mogadishu in 2006.
Hospital officials reported 30 dead in three days of clashes on the city's south side.
In June, the ship USS Carter Hall fired warning shots in an attempt to stop a hijacked Danish cargo ship off Somalia, but the American vessel turned away when the pirated ship entered Somali waters.
In May, a U.S. Navy advisory warned merchant ships to stay at least 200 miles off the Somali coast. But the U.S. Maritime Administration said pirates sometimes issue false distress calls to lure ships closer to shore. See the warning area »
The pirates often are armed with automatic rifles and shoulder-fired rockets, according to a recent warning from the agency.
"To date, vessels that increase speed and take evasive maneuvers avoid boarding, while those that slow down are boarded, taken to the Somali coastline and released after successful ransom payment, often after protracted negotiations of as much as 11 weeks," the warning advised.
The agency issued a new warning to sailors in the Gulf of Aden, between Somalia and Yemen, after Sunday's hijacking. E-mail to a friend
CNN correspondents Barbara Starr at the Pentagon and Christian Purefoy in Nairobi contributed to this report.