The Cole, an American Navy destroyer refueling in Yemen, was rocked by an enormous explosion on Thursday, and President Clinton said it appeared to be a terrorist attack. At least 6 American sailors died and 11 others were missing and presumed dead, officials said. Nearly three dozen others were injured, some of them severely.

The explosion came from one of several smaller harbor boats helping the destroyer Cole dock at a refueling station in this port, on the southern tip of the Arabian peninsula. Senior Pentagon officials said the boat, with at least two men aboard, had been loaded with explosives in what was evidently a well-planned suicide attack.

As dawn broke this morning, the American vessel could be seen from across the harbor, with a black hole in its side and sooty marks running up from the water. Sailors were active on the deck, and the first American investigators began arriving. The hole in the ship was later covered with a white tarpaulin.

The harbor area was tense and tightly sealed by army and police units of Yemen, many of them in camouflage. One officer said: ”The Americans are our friends. This is bad for Yemen.” Mr. Clinton, already grappling with escalating violence in the Middle East, appeared in the Rose Garden at the White House Thursday afternoon and somberly vowed to determine who was responsible and hold them accountable. His remarks raised the possibility of American military retaliation.

”If, as it now appears, this was an act of terrorism, it was a despicable and cowardly act,” Mr. Clinton said, only moments after having met with his senior national security advisers.

Secretary of Defense William S. Cohen said in Washington that no one had immediately claimed responsibility for the attack. He and others in Washington warned against prematurely assigning blame to any group or speculating on the motives for an attack.

Officials said the explosion, which occurred at 12:15 p.m. (5:15 a.m. Eastern time), tore a gaping hole, 20 feet by 40 feet, in the side of the Cole, a guided-missile destroyer based in Norfolk, Va., which was carrying a crew of about 300. The blast caused extensive flooding, causing the ship to list slightly. By nightfall Thursday, crew members had managed to control the flooding and keep the ship afloat.

The blast was devastatingly powerful. Adm. Vern Clark, the chief of naval operations, said that the Cole’s hull at the point of the blast was designed to withstand 51,000 pounds of pressure per square inch. Photographs of the Cole showed a charred, bent hole at the waterline.

The officials said they would not know the exact type of explosive used until forensic experts arrive and take samples from the ship’s hull.

The United States has been trying to engage Yemen diplomatically, despite its history as a haven for terrorist groups, in part with port calls like the Cole’s. American ships have stopped in Aden a dozen times since last year, officials said. Admiral Clark said that efforts to improve ties with Yemen were ”at the heart of the motivation” to use its refueling station.

The Cole, on its way to the Persian Gulf to join a naval battle group involved in operations regarding Iraq, had just arrived in Aden when the blast occurred. It was scheduled to stay only about four hours, just long enough to refuel before resuming its journey.

While Mr. Clinton and his senior aides stopped short of definitively attributing the explosion to terrorism, senior Pentagon officials said the Cole was attacked in a highly sophisticated operation that depended on access to information about its brief visit to Aden. They said evidence indicated that the attack may have been weeks or months in the planning, suggesting that it might not be directly related to the roiling tensions in the Middle East.

”It was clearly a pre-planned, premeditated event,” one officer said.

Admiral Clark, who appeared at the Pentagon with Mr. Cohen, the Secretary of Defense, said he had little doubt the explosion was deliberate. ”I have no reason to think that this was anything but a senseless act of terrorism,” he said.

Attorney General Janet Reno announced that an Federal Bureau of Investigation team of investigators would lead the inquiry. The first agents came from an F.B.I. office in Saudi Arabia, while a larger group that included explosive experts was leaving from Washington, along with investigators from the State Department and Pentagon.

Ali Abdullah Saleh, the president of Yemen and a former army general, said there was no evidence linking the blast to the current fighting in Israel. ”Yemen does not have any terrorist elements, and there is no relationship between this and what is happening in the occupied territories,” Mr. Saleh said in an interview with CNN.

But according to the State Department, several radical Islamic organizations operate in Yemen. They include the Palestinian group known as Hamas, the Palestinian Islamic Jihad, the Egyptian Islamic Jihad and cells linked to Osama bin Laden, the exiled Saudi whom American officials blamed for the bombings of American embassies in Kenya and Tanzania on Aug. 7, 1998. The United States retaliated for those bombings 13 days later with missile strikes in Afghanistan and the Sudan.

In recent weeks, President Saddam Hussein of Iraq has also intensified his threats against the United States, Israel and Arab states like Kuwait and Saudi Arabia. Even as the Cole was struck, American intelligence officials had detected movement by one of Iraq’s Republican Guard divisions west of the Iraqi capital, Baghdad, though Mr. Cohen suggested the timing could be coincidental.

The explosion came at the height of the American presidential race. Along with the violence in Israel, it immediately eclipsed the campaign debate. Vice President Al Gore returned to Washington from the campaign trail to participate in meetings at the White House about both crises. His Republican rival, Gov. George W. Bush of Texas, called for a vigorous, united approach on both fronts.

”Let’s hope we can gather enough intelligence to figure out who did the act and take the necessary action,” Mr. Bush said of the supposed attack. ”There must be a consequence.”

The incident was a jolt to an administration already scrambling to save the Middle East peace process, and its effects rippled around Washington and the world.

President Clinton, who returned early to the White House from a visit to Chappaqua, N.Y., where he celebrated his 25th wedding anniversary, ordered all American ships in the Persian Gulf region to pull out of port and head to the relative safety of open waters.

The Pentagon announced that it had heightened the state of alert for American forces around the world, including at American bases, while the State Department reiterated a worldwide advisory warning Americans living or traveling overseas to be watchful of potential terrorist attacks.

The Cole, an Arleigh Burke-class destroyer, is one of the Navy’s most sophisticated warships, equipped with advanced radar systems and high-speed missiles and cannons designed to protect itself and American battle groups against air and missile attacks.

Despite its technological sophistication, however, the ship was essentially helpless to prevent an attack of the type presumed to have happened — the maritime equivalent of a truck packed with explosives pulling up to a building.

The Cole’s crew was already on a heightened state of alert because of the threat of terrorism in the region generally, but the boat that exploded did not raise suspicions since it was part of a flotilla helping the Cole moor at a refueling pier in the port. ”It has a legitimate purpose for being in the area,” the senior official said of the ship.

According to Pentagon officials, an Army major who serves as deputy defense attache at the American Embassy in Yemen and was observing the refueling operation reported that the boat had already tied up one of the Cole’s mooring lines to the refueling station in the harbor. The officials said the boat then returned, evidently to retrieve another line, when it exploded.

One Pentagon official said the two men in the boat appeared to stand moments before the blast, but Mr. Cohen and Admiral Clark declined to speculate on their actions before the blast or their motives. Both evidently died in the explosion, while their boat was destroyed. It was not clear if others were aboard.

The Cole’s vulnerability to such an apparent attack immediately raised questions about the security measures the ship had taken. Admiral Clark said that the ship’s captain would not have necessarily have expected a routine mooring operation to pose a threat.

”Let me just say that the ability to deal with this kind of attack is limited by this circumstance,” Admiral Clark said.

While the visit was scheduled to be brief, Navy officials had notified the government of Yemen several days in advance. While security personnel were on deck at the time, a Pentagon official said the crew had no warning before the explosion, which had such force that it buckled the ship’s decks, badly damaging the engine room in the middle of the ship, as well as an adjoining mess and living quarters. Most of those killed were in those areas, the official said.

Secretary of State Madeleine K. Albright said she had spoken with the president of Yemen, Ali Abdullah Saleh, who had offered to help with the treatment of those injured and with the investigation.

If confirmed as a terrorist attack, it would be the worst against American military forces since the bombing of an Air Force barracks in Saudi Arabia killed 19 airmen in 1996. It was the worst attack on an American Navy ship since an Iraqi missile struck the Stark, a guided-missile frigate in the Persian Gulf in 1987, killing 37 sailors.

The Navy dispatched two other ships from the region to Yemen to help with the effort to secure and ultimately repair the Cole. They are expected to arrive today. Mr. Cohen said British and French ships were also headed to Aden to help.

The roughly three dozen injured by the explosion were being treated at a hospital in Aden but were expected to be evacuated soon to American military hospitals, possibly in Germany. A medical team was flying from the island nation of Bahrain, headquarters of the Navy’s 5th Fleet in the Persian Gulf.

At the Cole’s home port in Norfolk, the Navy set up a center for family members to gather as grim news of deaths and injuries came in.

Mr. Clinton said the explosion aboard the Cole would not scuttle American diplomatic efforts in the Middle East, if indeed that was the motive for the apparent attack. ”If their intention was to deter us from our mission of promoting peace and security in the Middle East, they will fail utterly,” he said.

At the Pentagon, Mr. Cohen echoed those remarks and warned that the United States would not rest ”until we have tracked down those who are responsible for this vicious and cowardly act.”

”In the wake of this tragedy,” he continued. ”I want to be very clear about one point. We will continue to protect our national interests around the world, in the Middle East and elsewhere. No one should doubt our resolve to remain a force for peace and for stability, and no one should assume that they can force us to retreat. No one should assume they can attack us with impunity.”

Photo: An unidentified American, above, was treated at a hospital in Yemen after an explosion tore a hole in the destroyer Cole, killing at least six. (U.S. Navy via Reuters); (Yemeni TV via Associated Press)(pg. A1); Yemen’s president, Ali Abdullah Saleh, right, visited wounded U.S. sailors in a hospital in Aden yesterday. (Yemeni TV via Reuters)(pg. A12) Chart: ”An Attack During a Routine Operation” The guided missile destroyer Cole was in the Yemeni port of Aden for a routine refueling stop. WHAT HAPPENED DURING THE MOORING 1. The destroyer Cole arrives at a refueling station in the harbor. Small boats approach and mooring lines are thrown down. 2. The boats tow the lines out to buoys. These lines are secured to buoys to stabilize the ship. 3. One boat returns to the ship and explodes, ripping a 20-by-40- foot hole in the hull and killing sailors onboard. THE DAMAGE Compartments sustaining serious damage in bold. Diagram shows: COMBAT INFORMATION CENTER GUN MACHINERY MISSILE LAUNCHERS AUXILIARY ENGINE ROOM 1 MAIN ENGINE ROOM 1 AUXILIARY MACHINE ROOM 2 MAIN ENGINE ROOM 2 WORKING SPACES MISSILE LAUNCHERS MESS DECK CHIEF’S QUARTERS (Source: U.S. Navy)(pg. A12) Maps of Yemen show the location of Aden. (pg. A12)