Riyadh (AFP) - Yemeni rebel "suicide" boats attacked a Saudi warship on patrol in the Red Sea, killing two sailors in what the Saudi-led coalition called an escalation of the nearly two-year-old war.

But the rebels' Al-Masirah television website said the strike "took place with a guided missile".

The assault off the rebel-held port of Hodeida came as coalition-backed government forces pressed a deadly drive up the Red Sea coast, despite mounting international pressure for a ceasefire.

"A Saudi frigate came under a terrorist attack by three suicide boats belonging to the Huthi militias," the coalition said late Monday without specifying when it happened.

Suicide attacks are uncharacteristic of the Shiite Muslim Huthi rebels. They are normally the work of Sunni extremists of Al-Qaeda or the Islamic State group.

Although the Saudi warship "dealt with the boats", one "collided with the back of the ship and exploded and caused a fire" which the crew brought under control, the coalition said.

Two Saudi crewmen lost their lives and three were wounded, the coalition said, adding that the frigate was able to resume patrolling.

"This tactic is now new. This means that there is today close collaboration between Al-Qaeda and the militia (rebels)," coalition spokesman Major General Ahmed Assiri told AFP.

"This a very bad escalation."

- 'Large fireball' -

Al-Qaeda and the rival IS have exploited a power vacuum created by the government-rebel war to expand their presence in Yemen and carry out attacks, especially in the south.

In purported video of the incident shown on Al-Masirah, the stern of a warship exploded in a large fireball.

Al-Masirah referred to "the shelling of the naval ship" and said it came in conjunction with the fighting along the Red Sea coast.

Since it began air strikes in March 2015, the coalition has imposed an air and sea blockade of rebel-held areas.

It has patrolled the Red Sea to prevent what it says is attempted arms smuggling to the rebels by Shiite Iran.

Story continues

Before government forces launched a major offensive on January 7, the rebels controlled virtually all of Yemen's 450-kilometre (280-mile) Red Sea coastline.

But loyalist forces have since thrust north from the Bab al-Mandab strait where the Red Sea joins the Indian Ocean, overrunning Dhubab district and entering the historic port of Mokha in their biggest advance in months.

Nearly 370 combatants on both sides have been killed, according to medical sources.

"Because they lost Al-Mokha now they moved their terrorist base and these kind of attacks to Hodeida," Assiri said.

Government forces have also pushed south from a small pocket of territory they control near the Saudi border.

- Trapped in a minefield -

Heavy fighting has raged there around Midi and the inland town of Haradh, leaving 21 government troops and seven rebels dead over the past 24 hours, military sources said Tuesday.

Loyalists launched an assault on rebel positions but found themselves in a minefield and under heavy gunfire, a military official said.

"That is why the death toll was high."

The offensive comes with President Abedrabbo Mansour Hadi under mounting international pressure to agree to a UN ceasefire plan.

In a speech to the Security Council on Thursday, UN envoy Ismail Ould Cheikh Ahmed criticised Hadi for rejecting his proposals for a transition that would see him cede much of his power to a vice president who would oversee a government of national unity.

On Monday, rebel rocket fire against "a United Nations building" in South Dhahran, a Saudi border city, wounded a soldier from the kingdom, the official Saudi Press Agency said.

The building is supposed to host meetings of a commission facilitating contact between Yemen's warring sides.

Elsewhere, the Huthis and government forces swapped prisoners -- 54 from each side -- in the Qania area of central Yemen following tribal mediation, a negotiator told AFP.

And police said government forces killed Ammar Qaid, known as Al-Qaeda's "emir" in Lahj in the southwest, after he refused to surrender on Tuesday.