Pirates attacked a Spanish fishing vessel Sunday in the Indian Ocean with small arms and a rocket-propelled grenade but private security guards aboard the ship drove them off with gunfire, officials said.

The attempted hijacking came less than two weeks after another Spanish trawler, the Alakrana, was released by Somali pirates who had held it and its crew of 36 for nearly seven weeks.

On Sunday, two skiffs chased the Spanish ship Ortube Berria for about 30 minutes before security guards stationed on it opened fire and fended them off, the Spanish Defense Ministry said.

None of the ship's crew members were hurt during the attack, about 265 miles southwest of the Seychelles Islands, the statement said.

The trawler's captain, Iker Barbas, said there were about four people in each of the skiffs and they were going fast enough to have caught up with the trawler eventually.

"They would not give up. They would simply not give up," he told Cadena Ser radio. "If we had not been armed, they would have caught us."

A European Union naval force staging an anti-piracy operation in the Indian Ocean summoned a Portuguese frigate and a patrol plane to the area.

In late October the government passed a decree allowing Spanish fishing vessels in the Indian Ocean to carry private security guards armed with assault weapons to fight off pirate attacks.

Spanish ship owners had pressed the government to put troops on Spanish fishing in the Indian Ocean, as France does with its boats. But the government says Spanish law does not allow the military to be used for protecting private property.

It says all Spanish vessels off Somalia now have security guards aboard.